[][src]Struct ipfs_embed::Ipfs

pub struct Ipfs<P, S, N> { /* fields omitted */ }

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]

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]

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]

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]

type Params = P

Store parameters.

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]

impl<P, S, N> Sync for Ipfs<P, S, N> where
    N: Send + Sync,
    P: Sync,
    S: Send + Sync
[src]

impl<P, S, N> Unpin for Ipfs<P, S, N> where
    P: Unpin
[src]

impl<P, S, N> !UnwindSafe for Ipfs<P, S, N>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> References<RawCodec> for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]