Skip to main content

NixDaemonIO

Trait NixDaemonIO 

Source
pub trait NixDaemonIO: Sync {
    // Required methods
    fn query_path_info(
        &self,
        path: &StorePath,
    ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send;
    fn query_path_from_hash_part(
        &self,
        hash: &[u8],
    ) -> impl Future<Output = Result<Option<UnkeyedValidPathInfo>>> + Send;
    fn query_missing(
        &self,
        derived_paths: Vec<DerivedPath>,
    ) -> impl Future<Output = Result<QueryMissingResult>> + Send;
    fn query_derivation_output_map(
        &self,
        drv_path: &StorePath,
    ) -> impl Future<Output = Result<BTreeMap<OutputName, Option<StorePath>>>> + Send;
    fn add_to_store_nar<R>(
        &self,
        info: ValidPathInfo,
        reader: &mut R,
        repair: bool,
        dont_check_sigs: bool,
    ) -> impl Future<Output = Result<()>> + Send
       where R: AsyncRead + Send + Unpin;
    fn nar_from_path(
        &self,
        path: &StorePath,
    ) -> impl Future<Output = Result<Box<dyn AsyncBufRead + Unpin + Send>>> + Send;
    fn build_paths(
        &self,
        derived_paths: Vec<DerivedPath>,
        mode: BuildMode,
    ) -> impl Future<Output = Result<()>> + Send;
    fn build_paths_with_results(
        &self,
        derived_paths: Vec<DerivedPath>,
        mode: BuildMode,
    ) -> impl Future<Output = Result<Vec<KeyedBuildResult>>> + Send;

    // Provided methods
    fn is_valid_path(
        &self,
        path: &StorePath,
    ) -> impl Future<Output = Result<bool>> + Send { ... }
    fn ensure_path(
        &self,
        path: &StorePath,
    ) -> impl Future<Output = Result<()>> + Send { ... }
    fn query_valid_paths(
        &self,
        request: &QueryValidPaths,
    ) -> impl Future<Output = Result<Vec<StorePath>>> + Send { ... }
    fn query_valid_derivers(
        &self,
        path: &StorePath,
    ) -> impl Future<Output = Result<Vec<StorePath>>> + Send { ... }
}
Available on crate feature daemon only.
Expand description

Represents all possible operations over the nix-daemon protocol.

Required Methods§

Source

fn query_path_info( &self, path: &StorePath, ) -> 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 query_missing( &self, derived_paths: Vec<DerivedPath>, ) -> impl Future<Output = Result<QueryMissingResult>> + Send

Source

fn query_derivation_output_map( &self, drv_path: &StorePath, ) -> impl Future<Output = Result<BTreeMap<OutputName, Option<StorePath>>>> + Send

Source

fn add_to_store_nar<R>( &self, info: ValidPathInfo, reader: &mut R, repair: bool, dont_check_sigs: bool, ) -> impl Future<Output = Result<()>> + Send
where R: AsyncRead + Send + Unpin,

Source

fn nar_from_path( &self, path: &StorePath, ) -> impl Future<Output = Result<Box<dyn AsyncBufRead + Unpin + Send>>> + Send

Source

fn build_paths( &self, derived_paths: Vec<DerivedPath>, mode: BuildMode, ) -> impl Future<Output = Result<()>> + Send

Source

fn build_paths_with_results( &self, derived_paths: Vec<DerivedPath>, mode: BuildMode, ) -> impl Future<Output = Result<Vec<KeyedBuildResult>>> + Send

Provided Methods§

Source

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

Source

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

Source

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

Source

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

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.

Implementors§