Trait WritableType

Source
pub trait WritableType {
    // Required methods
    fn write(&self, writer: &mut dyn Write) -> Result<()>;
    fn size(&self) -> usize;
}
Expand description

Indicates that a type could be used as cache key/value. Used alongside ReadableType

Required Methods§

Source

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source

fn size(&self) -> usize

Implementations on Foreign Types§

Source§

impl WritableType for bool

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for f32

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for f64

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for i16

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for i32

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for i64

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for u8

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for u16

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for String

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<bool>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<f32>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<f64>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<i16>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<i32>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<i64>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<u8>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl WritableType for Vec<u16>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl<T: WritableType + ReadableType> WritableType for Vec<Option<T>>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Source§

impl<T: WritableType> WritableType for Option<T>

Source§

fn write(&self, writer: &mut dyn Write) -> Result<()>

Source§

fn size(&self) -> usize

Implementors§