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§
Required Methods§
Sourceasync fn ancestry(source: &Self::Source) -> Result<Ancestry, Self::Error>
async fn ancestry(source: &Self::Source) -> Result<Ancestry, Self::Error>
Resolve ancestry from the source.
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>
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.