Skip to main content

FixStr

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 &FixStr requires printable ASCII (0x20-0x7e); from_ascii checks every byte before converting. To skip the check see from_ascii_unchecked; for an owned result see FixString::from_ascii.

§Errors

Returns Err if any byte is outside printable ASCII, reporting its index and value.

Source

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

Converts a slice of bytes to a FIX string slice without checking it.

See the safe version, from_ascii, for more information.

§Safety

Every byte passed in must be printable ASCII (0x20-0x7e).

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<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<[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<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<(), Error>

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 Eq for FixStr

Source§

impl From<&FixStr> for FixString

Source§

fn from(input: &FixStr) -> FixString

Converts to this type from the input type.
Source§

impl Hash for FixStr

Source§

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

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 for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<&FixStr> for FixString

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

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

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<&[u8]> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<&str> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<FixStr> for FixString

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<FixString> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<FixString> for &FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<String> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<String> for &FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<Vec<u8>> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<Vec<u8>> for &FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

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

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

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

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<[u8]> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<[u8]> for &FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<str> for FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialEq<str> for &FixStr

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 StructuralPartialEq for FixStr

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

Auto Trait Implementations§

§

impl !Sized for FixStr

§

impl Forget for FixStr

§

impl Freeze for FixStr

§

impl RefUnwindSafe for FixStr

§

impl Send for FixStr

§

impl Sync for FixStr

§

impl Unpin for FixStr

§

impl UnsafeUnpin 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