#[non_exhaustive]pub enum CompIdError {
Empty,
TooLong {
len: usize,
max_len: usize,
},
IllegalByte {
byte: u8,
position: usize,
},
}Expand description
Rejection reasons for crate::types::CompId construction.
A CompID is written verbatim into SenderCompID (49) and TargetCompID (56) on every outbound message, so an empty value or one carrying SOH or another control byte would produce a malformed or injectable frame. Construction is the chokepoint that makes that unrepresentable.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
The value is empty.
An empty CompID would encode as 49=<SOH> (or 56=<SOH>), a field
with no value that FIX TagValue treats as malformed.
TooLong
The value does not fit in the fixed inline storage.
Fields
§
max_len: usizeMaximum length in bytes, crate::types::COMP_ID_MAX_LEN.
IllegalByte
The value contains a byte outside printable ASCII (0x20..=0x7e).
Trait Implementations§
Source§impl Clone for CompIdError
impl Clone for CompIdError
Source§fn clone(&self) -> CompIdError
fn clone(&self) -> CompIdError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompIdError
Source§impl Debug for CompIdError
impl Debug for CompIdError
Source§impl Display for CompIdError
impl Display for CompIdError
impl Eq for CompIdError
Source§impl Error for CompIdError
impl Error for CompIdError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for CompIdError
impl PartialEq for CompIdError
impl StructuralPartialEq for CompIdError
Auto Trait Implementations§
impl Freeze for CompIdError
impl RefUnwindSafe for CompIdError
impl Send for CompIdError
impl Sync for CompIdError
impl Unpin for CompIdError
impl UnsafeUnpin for CompIdError
impl UnwindSafe for CompIdError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more