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>
impl<T, E> SbpString<T, E>
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
source§impl SbpString<Vec<u8>, DoubleNullTerminated>
impl SbpString<Vec<u8>, DoubleNullTerminated>
pub fn double_null_terminated( data: impl Into<Vec<u8>> ) -> Result<Self, DoubleNullTerminatedError>
pub fn from_parts(parts: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self
Trait Implementations§
source§impl<'de, E, const LEN: usize> Deserialize<'de> for SbpString<[u8; LEN], E>
impl<'de, E, const LEN: usize> Deserialize<'de> for SbpString<[u8; LEN], E>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de, E> Deserialize<'de> for SbpString<Vec<u8>, E>
impl<'de, E> Deserialize<'de> for SbpString<Vec<u8>, E>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: PartialEq, E: PartialEq> PartialEq for SbpString<T, E>
impl<T: PartialEq, E: PartialEq> PartialEq for SbpString<T, E>
impl<T: Eq, E: Eq> Eq for SbpString<T, E>
impl<T, E> StructuralPartialEq for SbpString<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for SbpString<T, E>where
T: Freeze,
impl<T, E> RefUnwindSafe for SbpString<T, E>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for SbpString<T, E>
impl<T, E> Sync for SbpString<T, E>
impl<T, E> Unpin for SbpString<T, E>
impl<T, E> UnwindSafe for SbpString<T, E>where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more