Expand description
A string with a custom size prefix integer type.
S
- The size prefix type.
Fields
value: String
Implementations
Trait Implementations
sourceimpl<S: Integer> Parcel for String<S>
impl<S: Integer> Parcel for String<S>
sourcefn read_field(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
fn read_field(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
Reads a value from a stream. Read more
sourcefn write_field(
&self,
write: &mut dyn Write,
settings: &Settings,
hints: &mut Hints
) -> Result<(), Error>
fn write_field(
&self,
write: &mut dyn Write,
settings: &Settings,
hints: &mut Hints
) -> Result<(), Error>
Writes a value to a stream.
sourcefn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
fn read(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
Reads a new item with a fresh set of hints. Read more
sourcefn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
fn write(&self, write: &mut dyn Write, settings: &Settings) -> Result<(), Error>
Writes a value to a stream.
sourcefn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
fn into_stream(self, settings: &Settings) -> Result<Cursor<Vec<u8>>, Error>
Convers the value into a byte stream that implements std::io::Read
.
sourcefn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
fn from_raw_bytes(bytes: &[u8], settings: &Settings) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
sourcefn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
fn field_from_raw_bytes(
bytes: &[u8],
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
Parses a new value from its raw byte representation. Read more
sourcefn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
fn raw_bytes(&self, settings: &Settings) -> Result<Vec<u8>, Error>
Gets the raw byte representation of the value.
sourceimpl<S: PartialEq + Integer> PartialEq<String<S>> for String<S>
impl<S: PartialEq + Integer> PartialEq<String<S>> for String<S>
impl<S: Integer> StructuralPartialEq for String<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for String<S> where
S: RefUnwindSafe,
impl<S> Send for String<S> where
S: Send,
impl<S> Sync for String<S> where
S: Sync,
impl<S> Unpin for String<S> where
S: Unpin,
impl<S> UnwindSafe for String<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more