[−][src]Struct ipfs_embed_db::StorageService
Implementations
impl<S: StoreParams> StorageService<S> where
Ipld: Decode<S::Codecs>,
[src]
Ipld: Decode<S::Codecs>,
pub fn open(
config: &Config,
cache_size: usize,
sweep_interval: Option<Duration>
) -> Result<Self>
[src]
config: &Config,
cache_size: usize,
sweep_interval: Option<Duration>
) -> Result<Self>
pub fn atime(&self) -> u64
[src]
pub async fn evict(&self, grace_atime: u64) -> Result<()>
[src]
pub async fn flush(&self) -> Result<()>
[src]
pub fn iter(&self) -> impl Iterator<Item = Result<Cid>>
[src]
Trait Implementations
impl<S: StoreParams> Storage<S> for StorageService<S> where
Ipld: Decode<S::Codecs>,
[src]
Ipld: Decode<S::Codecs>,
type Subscription = Subscription
pub fn contains(&self, cid: &Cid) -> Result<bool>
[src]
pub fn get(&self, cid: &Cid) -> Result<Option<Vec<u8>>>
[src]
pub fn insert(&self, block: &Block<S>) -> Result<()>
[src]
pub fn alias<'life0, 'life1, 'async_trait, T: AsRef<[u8]> + Send + Sync>(
&'life0 self,
alias: T,
cid: Option<&'life1 Cid>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
alias: T,
cid: Option<&'life1 Cid>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn resolve<T: AsRef<[u8]> + Send + Sync>(
&self,
alias: T
) -> Result<Option<Cid>>
[src]
&self,
alias: T
) -> Result<Option<Cid>>
pub fn pinned<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Option<bool>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Option<bool>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn subscribe(&self) -> Self::Subscription
[src]
Auto Trait Implementations
impl<S> !RefUnwindSafe for StorageService<S>
[src]
impl<S> Send for StorageService<S>
[src]
impl<S> Sync for StorageService<S>
[src]
impl<S> Unpin for StorageService<S>
[src]
impl<S> !UnwindSafe for StorageService<S>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> References<RawCodec> for T
pub fn references<R, E>(
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
R: Read,
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
R: Read,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,