Trait fricgan::FricganString
[−]
[src]
pub trait FricganString { fn fio_string_read<V>(&mut self, source: &[u8]) -> usize
where
V: ToPrimitive + FromPrimitive + Unsigned + IO; fn fio_string_write<V>(&mut self, sink: &mut [u8]) -> usize
where
V: ToPrimitive + FromPrimitive + Unsigned + IO; }
FricganString defines the string interface of fio_string_read
and
fio_string_write
. By default it is implemented for String
,
though it can theoretically work on any container class.
Required Methods
fn fio_string_read<V>(&mut self, source: &[u8]) -> usize where
V: ToPrimitive + FromPrimitive + Unsigned + IO,
V: ToPrimitive + FromPrimitive + Unsigned + IO,
Read a String value using an unsigned integer.
This can be used for arbitrary types, but it is designed to operate on String.
fn fio_string_write<V>(&mut self, sink: &mut [u8]) -> usize where
V: ToPrimitive + FromPrimitive + Unsigned + IO,
V: ToPrimitive + FromPrimitive + Unsigned + IO,
Writes the underlying string to sink prefixed with an unsigned integer indicating length.
This can be used for arbitrary types, but it is designed to operate on String.
Implementations on Foreign Types
impl FricganString for String
[src]
fn fio_string_read<V>(&mut self, source: &[u8]) -> usize where
V: ToPrimitive + FromPrimitive + Unsigned + IO,
[src]
V: ToPrimitive + FromPrimitive + Unsigned + IO,
fn fio_string_write<V>(&mut self, sink: &mut [u8]) -> usize where
V: ToPrimitive + FromPrimitive + Unsigned + IO,
[src]
V: ToPrimitive + FromPrimitive + Unsigned + IO,