Trait nix_compat::wire::de::NixDeserialize

source ·
pub trait NixDeserialize: Sized {
    // Required method
    fn try_deserialize<R>(
        reader: &mut R,
    ) -> impl Future<Output = Result<Option<Self>, R::Error>> + Send + '_
       where R: ?Sized + NixRead + Send;

    // Provided method
    fn deserialize<R>(
        reader: &mut R,
    ) -> impl Future<Output = Result<Self, R::Error>> + Send + '_
       where R: ?Sized + NixRead + Send { ... }
}
Expand description

A data structure that can be deserialized from the Nix daemon worker protocol.

Required Methods§

source

fn try_deserialize<R>( reader: &mut R, ) -> impl Future<Output = Result<Option<Self>, R::Error>> + Send + '_
where R: ?Sized + NixRead + Send,

Read a value from the reader. This returns an Option to support gracefull shutdown.

Provided Methods§

source

fn deserialize<R>( reader: &mut R, ) -> impl Future<Output = Result<Self, R::Error>> + Send + '_
where R: ?Sized + NixRead + Send,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NixDeserialize for bool

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl NixDeserialize for i64

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl NixDeserialize for u64

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl NixDeserialize for usize

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl NixDeserialize for Bytes

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl NixDeserialize for String

source§

async fn try_deserialize<R>(reader: &mut R) -> Result<Option<Self>, R::Error>
where R: ?Sized + NixRead + Send,

source§

impl<K, V> NixDeserialize for BTreeMap<K, V>

source§

fn try_deserialize<R>( reader: &mut R, ) -> impl Future<Output = Result<Option<Self>, R::Error>> + Send + '_
where R: ?Sized + NixRead + Send,

source§

impl<T> NixDeserialize for Vec<T>
where T: NixDeserialize + Send,

source§

fn try_deserialize<R>( reader: &mut R, ) -> impl Future<Output = Result<Option<Self>, R::Error>> + Send + '_
where R: ?Sized + NixRead + Send,

Implementors§