pub struct SbpString<T, E = Unterminated> { /* private fields */ }
Expand description
Fixed or variable length string and its encoding.
Implementations§
source§impl<T, E> SbpString<T, E>where
T: AsRef<[u8]>,
impl<T, E> SbpString<T, E>where T: AsRef<[u8]>,
source§impl<T: AsRef<[u8]>> SbpString<T, Unterminated>
impl<T: AsRef<[u8]>> SbpString<T, Unterminated>
sourcepub fn unterminated(data: T) -> Self
pub fn unterminated(data: T) -> Self
Checked unterminated SbpString builder,
source§impl<T: AsRef<[u8]>> SbpString<T, NullTerminated>
impl<T: AsRef<[u8]>> SbpString<T, NullTerminated>
pub fn null_terminated(data: T) -> Result<Self, NullTerminatedError>
source§impl SbpString<Vec<u8>, Multipart>
impl SbpString<Vec<u8>, Multipart>
pub fn multipart(data: impl Into<Vec<u8>>) -> Result<Self, MultipartError>
sourcepub fn from_parts(parts: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self
pub fn from_parts(parts: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self
Unchecked from parts builder to construct Multipart SbpString