Trait nix_compat::nix_daemon::NixDaemonIO

source ·
pub trait NixDaemonIO: Sync {
    // Required methods
    fn query_path_info(
        &self,
        path: &StorePath<String>,
    ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send;
    fn query_path_from_hash_part(
        &self,
        hash: &[u8],
    ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send;
    fn add_to_store_nar<R>(
        &self,
        request: AddToStoreNarRequest,
        reader: &mut R,
    ) -> impl Future<Output = Result<()>> + Send
       where R: AsyncRead + Send + Unpin;

    // Provided methods
    fn is_valid_path(
        &self,
        path: &StorePath<String>,
    ) -> impl Future<Output = Result<bool>> + Send { ... }
    fn query_valid_paths(
        &self,
        request: &QueryValidPaths,
    ) -> impl Future<Output = Result<Vec<UnkeyedValidPathInfo>>> + Send { ... }
    fn query_valid_derivers(
        &self,
        path: &StorePath<String>,
    ) -> impl Future<Output = Result<Vec<StorePath<String>>>> + Send { ... }
}
Expand description

Represents all possible operations over the nix-daemon protocol.

Required Methods§

source

fn query_path_info( &self, path: &StorePath<String>, ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send

source

fn query_path_from_hash_part( &self, hash: &[u8], ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send

source

fn add_to_store_nar<R>( &self, request: AddToStoreNarRequest, reader: &mut R, ) -> impl Future<Output = Result<()>> + Send
where R: AsyncRead + Send + Unpin,

Provided Methods§

source

fn is_valid_path( &self, path: &StorePath<String>, ) -> impl Future<Output = Result<bool>> + Send

source

fn query_valid_paths( &self, request: &QueryValidPaths, ) -> impl Future<Output = Result<Vec<UnkeyedValidPathInfo>>> + Send

source

fn query_valid_derivers( &self, path: &StorePath<String>, ) -> impl Future<Output = Result<Vec<StorePath<String>>>> + Send

Object Safety§

This trait is not object safe.

Implementors§