pub struct FixStr(/* private fields */);Implementations§
Source§impl FixStr
impl FixStr
Sourcepub const fn from_ascii(buf: &[u8]) -> Result<&FixStr, FixStringError>
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.
Sourcepub const unsafe fn from_ascii_unchecked(buf: &[u8]) -> &FixStr
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).