Trait taos_query::util::Inlinable
source · [−]pub trait Inlinable {
fn read_inlined<R: Read>(reader: &mut R) -> Result<Self>
where
Self: Sized;
fn write_inlined<W: Write>(&self, wtr: &mut W) -> Result<usize>;
fn read_optional_inlined<R: Read>(reader: &mut R) -> Result<Option<Self>>
where
Self: Sized,
{ ... }
fn write_inlined_with<W: Write>(
&self,
wtr: &mut W,
_opts: InlineOpts
) -> Result<usize> { ... }
fn inlined(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator, { ... }
fn printable_inlined(&self) -> String { ... }
}Expand description
If one struct could be serialized/flattened to bytes array, we call it inlinable.
Required Methods
Read inlined bytes into object.
Provided Methods
fn write_inlined_with<W: Write>(
&self,
wtr: &mut W,
_opts: InlineOpts
) -> Result<usize>
fn write_inlined_with<W: Write>(
&self,
wtr: &mut W,
_opts: InlineOpts
) -> Result<usize>
Write inlined bytes with specific options
Get inlined bytes as vector.
fn printable_inlined(&self) -> String
fn printable_inlined(&self) -> String
Get inlined bytes as printable string, all the bytes will displayed with escaped ascii code.