Trait ReadableType

Source
pub trait ReadableType: Sized {
    // Required method
    fn read_unwrapped(
        type_code: TypeCode,
        reader: &mut impl Read,
    ) -> IgniteResult<Option<Self>>;

    // Provided method
    fn read(reader: &mut impl Read) -> IgniteResult<Option<Self>> { ... }
}
Expand description

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

Required Methods§

Source

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Provided Methods§

Source

fn read(reader: &mut impl Read) -> IgniteResult<Option<Self>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ReadableType for bool

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for f32

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for f64

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for i16

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for i32

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for i64

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for u8

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for u16

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for String

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<bool>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<f32>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<f64>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<i16>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<i32>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<i64>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<u8>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl ReadableType for Vec<u16>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

impl<T: ReadableType> ReadableType for Option<T>

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Source§

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

Source§

fn read_unwrapped( type_code: TypeCode, reader: &mut impl Read, ) -> IgniteResult<Option<Self>>

Implementors§