Skip to content

Commit

Permalink
MOD: Make publisher enums non-exhaustive
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen committed Mar 25, 2024
1 parent ac404c0 commit e1a80b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
permissible `rtype` values. Users should use `default_for_schema` instead
- Changed the default `match_algorithm` for `InstrumentDefMsg` and `InstrumentDefMsgV1`
from `Fifo` to `Undefined`
- Made `Dataset`, `Venue`, and `Publisher` non-exhaustive to allow future additions
without breaking changes

### Bug fixes
- Fixed an issue where the Python `MappingIntervalDict` was not exported
Expand Down
3 changes: 3 additions & 0 deletions rust/dbn/src/publishers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{Error, Result};

/// A trading execution venue.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, IntoPrimitive, TryFromPrimitive)]
#[non_exhaustive]
#[repr(u16)]
pub enum Venue {
/// CME Globex
Expand Down Expand Up @@ -215,6 +216,7 @@ impl std::str::FromStr for Venue {

/// A source of data.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, IntoPrimitive, TryFromPrimitive)]
#[non_exhaustive]
#[repr(u16)]
pub enum Dataset {
/// CME MDP 3.0 Market Data
Expand Down Expand Up @@ -374,6 +376,7 @@ impl std::str::FromStr for Dataset {

/// A specific Venue from a specific data source.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, IntoPrimitive, TryFromPrimitive)]
#[non_exhaustive]
#[repr(u16)]
pub enum Publisher {
/// CME Globex MDP 3.0
Expand Down

0 comments on commit e1a80b1

Please sign in to comment.