[−][src]Struct ipfs_embed::Ipfs
Implementations
impl<P, S, N> Ipfs<P, S, N> where
P: StoreParams + Unpin + 'static,
S: Storage<P>,
N: Network<P>,
Ipld: References<P::Codecs>,
[src]
P: StoreParams + Unpin + 'static,
S: Storage<P>,
N: Network<P>,
Ipld: References<P::Codecs>,
pub fn new(storage: Arc<S>, network: Arc<N>) -> Self
[src]
pub fn local_peer_id(&self) -> &PeerId
[src]
pub async fn listeners(&self) -> Vec<Multiaddr>
[src]
pub async fn external_addresses(&self) -> Vec<AddressRecord>
[src]
pub async fn pinned(&self, cid: &Cid) -> Result<Option<bool>>
[src]
pub fn bitswap_storage(&self) -> BitswapStorage<P, S>
[src]
pub async fn alias_with_syncer<T: AsRef<[u8]> + Send + Sync>(
&self,
alias: T,
cid: Option<&Cid>,
syncer: Option<Arc<dyn BitswapSync>>
) -> Result<()>
[src]
&self,
alias: T,
cid: Option<&Cid>,
syncer: Option<Arc<dyn BitswapSync>>
) -> Result<()>
impl Ipfs<DefaultParams, StorageService<DefaultParams>, NetworkService<DefaultParams>>
[src]
pub async fn default(path: Option<PathBuf>, cache_size: usize) -> Result<Self>
[src]
If no path is provided a temporary db will be created.
Trait Implementations
impl<P, S, N> Clone for Ipfs<P, S, N>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<P, S, N> Store for Ipfs<P, S, N> where
P: StoreParams + Unpin + 'static,
S: Storage<P>,
N: Network<P>,
Ipld: References<P::Codecs>,
[src]
P: StoreParams + Unpin + 'static,
S: Storage<P>,
N: Network<P>,
Ipld: References<P::Codecs>,
type Params = P
Store parameters.
pub fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cid: &'life1 Cid
) -> Pin<Box<dyn Future<Output = Result<Block<P>>> + 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<Block<P>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
pub fn insert<'life0, 'life1, 'async_trait>(
&'life0 self,
block: &'life1 Block<P>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
block: &'life1 Block<P>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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<'life0, 'async_trait, T: AsRef<[u8]> + Send + Sync>(
&'life0 self,
alias: T
) -> Pin<Box<dyn Future<Output = Result<Option<Cid>>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
alias: T
) -> Pin<Box<dyn Future<Output = Result<Option<Cid>>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn query<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 DagPath<'life2>
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Ipld: Decode<<Self::Params as StoreParams>::Codecs>,
[src]
&'life0 self,
path: &'life1 DagPath<'life2>
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Ipld: Decode<<Self::Params as StoreParams>::Codecs>,
Auto Trait Implementations
impl<P, S, N> !RefUnwindSafe for Ipfs<P, S, N>
[src]
impl<P, S, N> Send for Ipfs<P, S, N> where
N: Send + Sync,
P: Send,
S: Send + Sync,
[src]
N: Send + Sync,
P: Send,
S: Send + Sync,
impl<P, S, N> Sync for Ipfs<P, S, N> where
N: Send + Sync,
P: Sync,
S: Send + Sync,
[src]
N: Send + Sync,
P: Sync,
S: Send + Sync,
impl<P, S, N> Unpin for Ipfs<P, S, N> where
P: Unpin,
[src]
P: Unpin,
impl<P, S, N> !UnwindSafe for Ipfs<P, S, N>
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,