Expand description
A string with a custom size prefix integer type.
S
- The size prefix type.
Fields§
§value: String
Implementations§
Trait Implementations§
source§impl<S: Integer> Parcel for String<S>
impl<S: Integer> Parcel for String<S>
source§fn read(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
fn read(
read: &mut dyn Read,
settings: &Settings,
hints: &mut Hints
) -> Result<Self, Error>
Reads a value from a stream. Read more
source§fn 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.
source§fn read_new(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
fn read_new(read: &mut dyn Read, settings: &Settings) -> Result<Self, Error>
Reads a new item with a fresh set of hints. Read more
source§fn 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
.source§fn 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