Skip to main content

LazyIssue

Trait LazyIssue 

Source
pub trait LazyIssue<S> {
    type Source: Clone;
    type Error: Error;

    // Required methods
    async fn ancestry(source: &Self::Source) -> Result<Ancestry, Self::Error>;
    async fn identity(
        &mut self,
        source: Self::Source,
    ) -> Result<IssueIdentity, Self::Error>;
    async fn contents(
        &mut self,
        source: Self::Source,
    ) -> Result<IssueContents, Self::Error>;
    async fn children(
        &mut self,
        source: Self::Source,
    ) -> Result<Vec<Issue>, Self::Error>;
    async fn load(source: Self::Source) -> Result<Issue, Self::Error>;
}
Expand description

Trait for lazy loading of issues from a source.

S is a marker type (e.g., Local for filesystem, Remote for GitHub). The associated Source type is what’s actually passed to methods. Methods load data on demand; &mut self allows caching intermediate results.

Required Associated Types§

Source

type Source: Clone

The actual source reference type (e.g., LocalPath for Local, RemoteSource for Remote).

Source

type Error: Error

Error type for operations on this source.

Required Methods§

Source

async fn ancestry(source: &Self::Source) -> Result<Ancestry, Self::Error>

Resolve ancestry from the source.

Source

async fn identity( &mut self, source: Self::Source, ) -> Result<IssueIdentity, Self::Error>

Source

async fn contents( &mut self, source: Self::Source, ) -> Result<IssueContents, Self::Error>

Source

async fn children( &mut self, source: Self::Source, ) -> Result<Vec<Issue>, Self::Error>

Source

async fn load(source: Self::Source) -> Result<Issue, Self::Error>

Load a full issue tree from the source.

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§