Skip to main content

AsyncContractLoader

Trait AsyncContractLoader 

Source
pub trait AsyncContractLoader: Send + Sync {
    type Family: ContractFamily;
    type Loaded: Contract<Family = Self::Family> + Send + Sync;

    // Required method
    async fn load(&self) -> Result<Self::Loaded>;
}
Expand description

Async loading of remote or multi-document contracts (I/O primary API).

Parser crates implement this for fetch-and-parse workflows. The loaded value implements Contract for in-memory traversal.

Required Associated Types§

Source

type Family: ContractFamily

Contract family metadata for the loader.

Source

type Loaded: Contract<Family = Self::Family> + Send + Sync

Loaded contract type produced by this loader.

Required Methods§

Source

async fn load(&self) -> Result<Self::Loaded>

Fetches inputs and returns a fully loaded contract.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§