Skip to main content

Encodable

Trait Encodable 

Source
pub trait Encodable: Sized {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn read(reader: &mut Cursor<'_>) -> Result<Self, Self::Error>;
    fn write<E: Encoding>(&self, buf: &mut E);
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn read(reader: &mut Cursor<'_>) -> Result<Self, Self::Error>

Read from the SSH format.

Source

fn write<E: Encoding>(&self, buf: &mut E)

Write to the SSH format.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§