Struct easyfix_messages::fields::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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method 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

This method 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

This method 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

§

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

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for ApplVerId

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for BenchmarkCurveName

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for ClearingFeeIndicator

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for CustOrderHandlingInst

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for DefaultApplVerId

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for DeskOrderHandlingInst

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for DeskType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for IoiQty

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for MatchType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for MiscFeeType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for MsgType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for PosAmtType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for PosType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for PriceQuoteMethod

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for QuoteCondition

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for RestructuringType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SecurityIdSource

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SecurityStatus

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SecurityType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for Seniority

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SettlSessId

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SettlType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for StipulationType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for SymbolSfx

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for TimeUnit

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for TradeCondition

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for TradingSessionId

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for TradingSessionSubId

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for UnderlyingCashType

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for UnitOfMeasure

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for ValuationMethod

§

type Error = SessionRejectReason

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

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

Performs the conversion.
source§

impl TryFrom<&FixStr> for YieldType

§

type Error = SessionRejectReason

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

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

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§

default fn to_string(&self) -> String

Converts the given value to a String. Read more