InputSource

Trait InputSource 

Source
pub trait InputSource: Send + Sync {
    // Required methods
    fn get_bytes_by_cid<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn materialize_cid_to_temp<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn materialize_cid_with_meta<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<MaterializedInput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Source of input artifacts for a task.

Required Methods§

Source

fn get_bytes_by_cid<'life0, 'life1, 'async_trait>( &'life0 self, cid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch object bytes by CID.

Source

fn materialize_cid_to_temp<'life0, 'life1, 'async_trait>( &'life0 self, cid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Materialize CID to a temporary file path and return its location.

Provided Methods§

Source

fn materialize_cid_with_meta<'life0, 'life1, 'async_trait>( &'life0 self, cid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MaterializedInput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Materialize CID and include optional metadata describing the source artifact.

Implementors§