pub trait Helia: Send + Sync {
// Required methods
fn blockstore(&self) -> &dyn Blocks;
fn datastore(&self) -> &dyn Datastore;
fn pins(&self) -> &dyn Pins;
fn logger(&self) -> &dyn ComponentLogger;
fn routing(&self) -> &dyn Routing;
fn dns(&self) -> &TokioAsyncResolver;
fn metrics(&self) -> Option<&dyn Metrics>;
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn gc<'life0, 'async_trait>(
&'life0 self,
options: Option<GcOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_codec<'life0, 'async_trait>(
&'life0 self,
code: u64,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Codec>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_hasher<'life0, 'async_trait>(
&'life0 self,
code: u64,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Hasher>, HeliaError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Non-generic Helia trait for backward compatibility and trait objects
Required Methods§
Sourcefn blockstore(&self) -> &dyn Blocks
fn blockstore(&self) -> &dyn Blocks
The blockstore for storing blocks
Sourcefn logger(&self) -> &dyn ComponentLogger
fn logger(&self) -> &dyn ComponentLogger
The logger component
Sourcefn dns(&self) -> &TokioAsyncResolver
fn dns(&self) -> &TokioAsyncResolver
DNS resolver
Sourcefn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the Helia node
Sourcefn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the Helia node
Sourcefn gc<'life0, 'async_trait>(
&'life0 self,
options: Option<GcOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gc<'life0, 'async_trait>(
&'life0 self,
options: Option<GcOptions>,
) -> Pin<Box<dyn Future<Output = Result<(), HeliaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform garbage collection