Struct FixStr

Source
pub struct FixStr(/* private fields */);

Implementations§

Source§

impl FixStr

Source

pub const fn from_ascii(buf: &[u8]) -> Result<&FixStr, FixStringError>

Converts a slice of bytes to a string slice.

A FIX string slice (&FixStr) is made of bytes (u8), and a byte slice (&[u8]) is made of bytes, so this function converts between the two. Not all byte slices are valid string slices, however: &FixStr requires that it is valid ASCII without controll characters. from_ascii() checks to ensure that the bytes are valid, and then does the conversion.

If you are sure that the byte slice is valid ASCII without controll characters, and you don’t want to incur the overhead of the validity check, there is an unsafe version of this function, from_ascii_unchecked, which has the same behavior but skips the check.

If you need a FixString instead of a &FixStr, consider FixString::from_ascii.

Because you can stack-allocate a [u8; N], and you can take a &[u8] of it, this function is one way to have a stack-allocated string.

§Errors

Returns Err if the slice is not ASCII.

Source

pub const unsafe fn from_ascii_unchecked(buf: &[u8]) -> &FixStr

Converts a slice of bytes to a FIX string slice without checking that it contains only ASCII characters.

See the safe version, from_ascii, for more information.

§Safety

The bytes passed in must consists from ASCII characters only.

Source

pub const fn as_utf8(&self) -> &str

Source

pub const fn as_bytes(&self) -> &[u8]

Source

pub const fn len(&self) -> usize

Source

pub const fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl AsRef<[u8]> for FixStr

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<FixStr> for FixStr

Source§

fn as_ref(&self) -> &FixStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<FixStr> for FixString

Source§

fn as_ref(&self) -> &FixStr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for FixStr

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<FixStr> for FixString

Source§

fn borrow(&self) -> &FixStr

Immutably borrows from an owned value. Read more
Source§

impl Debug for FixStr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FixStr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&FixStr> for FixString

Source§

fn from(input: &FixStr) -> FixString

Converts to this type from the input type.
Source§

impl From<&FixStr> for String

Source§

fn from(input: &FixStr) -> String

Converts to this type from the input type.
Source§

impl Hash for FixStr

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Ord for FixStr

Source§

fn cmp(&self, other: &FixStr) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq<&[u8]> for FixStr

Source§

fn eq(&self, other: &&[u8]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize> PartialEq<&[u8; N]> for FixStr

Source§

fn eq(&self, other: &&[u8; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&FixStr> for [u8]

Source§

fn eq(&self, other: &&FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&FixStr> for FixString

Source§

fn eq(&self, other: &&FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&FixStr> for String

Source§

fn eq(&self, other: &&FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&FixStr> for Vec<u8>

Source§

fn eq(&self, other: &&FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&FixStr> for str

Source§

fn eq(&self, other: &&FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&str> for FixStr

Source§

fn eq(&self, other: &&str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<[u8]> for &FixStr

Source§

fn eq(&self, other: &[u8]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<[u8]> for FixStr

Source§

fn eq(&self, other: &[u8]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize> PartialEq<[u8; N]> for &FixStr

Source§

fn eq(&self, other: &[u8; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize> PartialEq<[u8; N]> for FixStr

Source§

fn eq(&self, other: &[u8; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for &[u8]

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for &str

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for [u8]

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for FixString

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for String

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for Vec<u8>

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixStr> for str

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixString> for &FixStr

Source§

fn eq(&self, other: &FixString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<FixString> for FixStr

Source§

fn eq(&self, other: &FixString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<String> for &FixStr

Source§

fn eq(&self, other: &String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<String> for FixStr

Source§

fn eq(&self, other: &String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Vec<u8>> for &FixStr

Source§

fn eq(&self, other: &Vec<u8>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Vec<u8>> for FixStr

Source§

fn eq(&self, other: &Vec<u8>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for &FixStr

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for FixStr

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for FixStr

Source§

fn eq(&self, other: &FixStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for FixStr

Source§

fn partial_cmp(&self, other: &FixStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToFixString for FixStr

Source§

impl ToOwned for FixStr

Source§

type Owned = FixString

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> FixString

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut FixString)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl TryFrom<&FixStr> for AdvTransType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<AdvTransType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for ApplVerId

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<ApplVerId, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for BenchmarkCurveName

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<BenchmarkCurveName, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for ClearingFeeIndicator

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<ClearingFeeIndicator, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for CustOrderHandlingInst

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<CustOrderHandlingInst, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for DefaultApplVerId

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<DefaultApplVerId, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for DeskOrderHandlingInst

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<DeskOrderHandlingInst, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for DeskType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<DeskType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for IoiQty

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<IoiQty, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for MatchType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<MatchType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for MiscFeeType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<MiscFeeType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for MsgType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<MsgType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for PosAmtType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<PosAmtType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for PosType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<PosType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for PriceQuoteMethod

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<PriceQuoteMethod, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for QuoteCondition

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<QuoteCondition, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for RestructuringType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<RestructuringType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SecurityIdSource

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SecurityIdSource, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SecurityStatus

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SecurityStatus, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SecurityType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SecurityType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for Seniority

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<Seniority, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SettlSessId

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SettlSessId, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SettlType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SettlType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for StipulationType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<StipulationType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for SymbolSfx

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<SymbolSfx, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for TimeUnit

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<TimeUnit, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for TradeCondition

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<TradeCondition, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for TradingSessionId

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<TradingSessionId, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for TradingSessionSubId

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<TradingSessionSubId, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for UnderlyingCashType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<UnderlyingCashType, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for UnitOfMeasure

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<UnitOfMeasure, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for ValuationMethod

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<ValuationMethod, ParseRejectReason>

Performs the conversion.
Source§

impl TryFrom<&FixStr> for YieldType

Source§

type Error = ParseRejectReason

The type returned in the event of a conversion error.
Source§

fn try_from(input: &FixStr) -> Result<YieldType, ParseRejectReason>

Performs the conversion.
Source§

impl Eq for FixStr

Source§

impl StructuralPartialEq for FixStr

Auto Trait Implementations§

§

impl Freeze for FixStr

§

impl RefUnwindSafe for FixStr

§

impl Send for FixStr

§

impl !Sized for FixStr

§

impl Sync for FixStr

§

impl Unpin for FixStr

§

impl UnwindSafe for FixStr

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more