pub struct StorageService<S: StoreParams> { /* private fields */ }
Implementations§
Source§impl<S: StoreParams> StorageService<S>
impl<S: StoreParams> StorageService<S>
pub fn open( config: StorageConfig, tx: UnboundedSender<StorageEvent>, ) -> Result<Self>
pub fn create_temp_pin(&self) -> Result<TempPin>
pub fn temp_pin( &self, temp: &TempPin, iter: impl IntoIterator<Item = Cid> + Send + 'static, ) -> Result<()>
pub fn iter(&self) -> Result<impl Iterator<Item = Cid>>
pub fn contains(&self, cid: &Cid) -> Result<bool>
pub fn get(&self, cid: &Cid) -> Result<Option<Vec<u8>>>
pub fn insert(&self, block: &Block<S>) -> Result<()>
pub async fn evict(&self) -> Result<()>
pub fn alias(&self, alias: &[u8], cid: Option<&Cid>) -> Result<()>
pub fn resolve(&self, alias: &[u8]) -> Result<Option<Cid>>
pub fn reverse_alias(&self, cid: &Cid) -> Result<Option<Vec<Vec<u8>>>>
pub fn missing_blocks(&self, cid: &Cid) -> Result<Vec<Cid>>
pub async fn flush(&self) -> Result<()>
pub fn register_metrics(&self, registry: &Registry) -> Result<()>
Trait Implementations§
Source§impl<S: Clone + StoreParams> Clone for StorageService<S>
impl<S: Clone + StoreParams> Clone for StorageService<S>
Source§fn clone(&self) -> StorageService<S>
fn clone(&self) -> StorageService<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<S> Freeze for StorageService<S>
impl<S> !RefUnwindSafe for StorageService<S>
impl<S> Send for StorageService<S>
impl<S> Sync for StorageService<S>
impl<S> Unpin for StorageService<S>
impl<S> !UnwindSafe for StorageService<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more