Trait extsort_lily::Sortable[][src]

pub trait Sortable<W: Write, R: Read>: Ord + Sized {
    type Error;
    fn serialize(&self, w: &mut W) -> Result<(), Self::Error>;
fn deserialize(r: &mut R) -> Option<Result<Self, Self::Error>>; }

Implement this trait for data to be sorted

Associated Types

type Error[src]

Errors that may occur during serialization and deserialization. Note that it needs to implement From<std::io::Error>.

Loading content...

Required methods

fn serialize(&self, w: &mut W) -> Result<(), Self::Error>[src]

serialize itself and write into the writer.

fn deserialize(r: &mut R) -> Option<Result<Self, Self::Error>>[src]

read data and deserialize.

If no more items to be read, return None.

Loading content...

Implementors

Loading content...