pub trait Database {
// Required methods
fn get_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Option<BuildHash>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
hash: BuildHash,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_header_inputs<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<str>>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_header_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
id: BuildId,
inputs: &'life1 [Arc<str>],
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_outputs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_output<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
source: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_source<'life0, 'life1, 'async_trait>(
&'life0 self,
output: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A database.
Required Methods§
Sourcefn get_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Option<BuildHash>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Option<BuildHash>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a hash of a build.
Sourcefn set_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
hash: BuildHash,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_hash<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
hash: BuildHash,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets a hash of a build.
Sourcefn get_header_inputs<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<str>>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_header_inputs<'life0, 'async_trait>(
&'life0 self,
id: BuildId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<str>>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets header inputs of a build.
Sourcefn set_header_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
id: BuildId,
inputs: &'life1 [Arc<str>],
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_header_inputs<'life0, 'life1, 'async_trait>(
&'life0 self,
id: BuildId,
inputs: &'life1 [Arc<str>],
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sets header inputs of a build.
Sourcefn get_outputs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_outputs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets all outputs.
Sourcefn set_output<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
source: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_output<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
source: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets an output and its source in a source map.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".