Struct IpfsClient

Source
pub struct IpfsClient<C = HttpConnector>
where C: Connect + Clone + Send + Sync + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<C: Connect + Clone + Send + Sync + 'static> HyperBackend<C>

Source

pub fn with_credentials<U, P>(self, username: U, password: P) -> Self
where U: Into<String>, P: Into<String>,

Trait Implementations§

Source§

impl<C> Backend for HyperBackend<C>
where C: Connect + Clone + Send + Sync + 'static,

Source§

type HttpRequest = Request<Body>

Source§

type HttpResponse = Response<Body>

Source§

type Error = Error

Source§

fn with_credentials<U, P>(self, username: U, password: P) -> Self
where U: Into<String>, P: Into<String>,

Set basic authentication credentials to use on every request from this client.
Source§

fn build_base_request<Req>( &self, req: Req, form: Option<Form<'static>>, ) -> Result<Self::HttpRequest, Error>
where Req: ApiRequest,

Builds the url for an api call.
Source§

fn get_header(res: &Self::HttpResponse, key: HeaderName) -> Option<&HeaderValue>

Get the value of a header from an HTTP response.
Source§

fn request_raw<'life0, 'async_trait, Req>( &'life0 self, req: Req, form: Option<Form<'static>>, ) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), Self::Error>> + 'async_trait>>
where Req: ApiRequest + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Generates a request, and returns the unprocessed response future.
Source§

fn response_to_byte_stream( res: Self::HttpResponse, ) -> BoxStream<Bytes, Self::Error>

Source§

fn request_stream<Res, F>( &self, req: Self::HttpRequest, process: F, ) -> BoxStream<Res, Self::Error>
where F: 'static + Send + Fn(Self::HttpResponse) -> BoxStream<Res, Self::Error>,

Generic method for making a request that expects back a streaming response.
Source§

fn process_error_from_body(body: Bytes) -> Self::Error

Builds an Api error from a response body.
Source§

fn process_json_response<Res>( status: StatusCode, body: Bytes, ) -> Result<Res, Self::Error>
where Res: 'static + for<'de> Deserialize<'de> + for<'de> Send,

Processes a response that expects a json encoded body, returning an error or a deserialized json response.
Source§

fn process_stream_response<D, Res>( res: Self::HttpResponse, decoder: D, ) -> FramedRead<StreamReader<Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>>, D>
where D: Decoder<Item = Res, Error = Error>,

Processes a response that returns a stream of json deserializable results.
Source§

fn request<'life0, 'async_trait, Req, Res>( &'life0 self, req: Req, form: Option<Form<'static>>, ) -> Pin<Box<dyn Future<Output = Result<Res, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Req: ApiRequest + 'async_trait, Res: 'static + for<'de> Deserialize<'de> + for<'de> Send + 'async_trait, Self: 'async_trait,

Generic method for making a request to the Ipfs server, and getting a deserializable response.
Source§

fn request_empty<'life0, 'async_trait, Req>( &'life0 self, req: Req, form: Option<Form<'static>>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Req: ApiRequest + 'async_trait, Self: 'async_trait,

Generic method for making a request to the Ipfs server, and getting back a response with no body.
Source§

fn request_string<'life0, 'async_trait, Req>( &'life0 self, req: Req, form: Option<Form<'static>>, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Req: ApiRequest + 'async_trait, Self: 'async_trait,

Generic method for making a request to the Ipfs server, and getting back a raw String response.
Source§

fn request_stream_bytes( &self, req: Self::HttpRequest, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Generic method for making a request to the Ipfs server, and getting back a raw stream of bytes.
Source§

fn request_stream_json<Res>( &self, req: Self::HttpRequest, ) -> Box<dyn Stream<Item = Result<Res, Self::Error>> + Unpin>
where Res: 'static + for<'de> Deserialize<'de> + for<'de> Send,

Generic method to return a streaming response of deserialized json objects delineated by new line separators.
Source§

impl<C> Clone for HyperBackend<C>
where C: Connect + Clone + Send + Sync + 'static + Clone,

Source§

fn clone(&self) -> HyperBackend<C>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for HyperBackend<HttpConnector>

Source§

fn default() -> Self

Creates an IpfsClient connected to the endpoint specified in ~/.ipfs/api. If not found, tries to connect to localhost:5001.

Source§

impl TryFromUri for HyperBackend<HttpConnector>

Source§

fn build_with_base_uri(base: Uri) -> Self

Builds a new client from a base URI to the IPFS API.
Source§

fn from_str(uri: &str) -> Result<Self, InvalidUri>

Creates a new client from a str. Read more
Source§

fn from_host_and_port( scheme: Scheme, host: &str, port: u16, ) -> Result<Self, Error>

Creates a new client from a host name and port.
Source§

fn from_ipv4(scheme: Scheme, addr: SocketAddrV4) -> Result<Self, Error>

Creates a new client from an IPV4 address and port number.
Source§

fn from_ipv6(scheme: Scheme, addr: SocketAddrV6) -> Result<Self, Error>

Creates a new client from an IPV6 addr and port number.
Source§

fn from_socket(scheme: Scheme, socket_addr: SocketAddr) -> Result<Self, Error>

Creates a new client from an IP address and port number.
Source§

fn from_multiaddr(multiaddr: Multiaddr) -> Result<Self, Error>

Creates a new client from a multiaddr.
Source§

fn from_multiaddr_str(multiaddr: &str) -> Result<Self, Error>

Creates a new client from a multiaddr.
Source§

fn from_ipfs_config() -> Option<Self>

Creates a new client connected to the endpoint specified in ~/.ipfs/api.

Auto Trait Implementations§

§

impl<C = HttpConnector> !Freeze for HyperBackend<C>

§

impl<C = HttpConnector> !RefUnwindSafe for HyperBackend<C>

§

impl<C> Send for HyperBackend<C>

§

impl<C> Sync for HyperBackend<C>

§

impl<C> Unpin for HyperBackend<C>
where C: Unpin,

§

impl<C = HttpConnector> !UnwindSafe for HyperBackend<C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<B> IpfsApi for B
where B: Backend,

Source§

fn add<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<AddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add file to Ipfs. Read more
Source§

fn add_async<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<AddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + AsyncRead + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add AsyncRead stream to Ipfs. Read more
Source§

fn add_with_options<'life0, 'life1, 'async_trait, R>( &'life0 self, data: R, add: Add<'life1>, ) -> Pin<Box<dyn Future<Output = Result<AddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add a file to IPFS with options. Read more
Source§

fn add_async_with_options<'life0, 'life1, 'async_trait, R>( &'life0 self, data: R, add: Add<'life1>, ) -> Pin<Box<dyn Future<Output = Result<AddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, R: 'static + AsyncRead + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add AsyncRead stream to IPFS with options. Read more
Source§

fn add_with_form<'life0, 'life1, 'async_trait, F>( &'life0 self, form: F, add: Add<'life1>, ) -> Pin<Box<dyn Future<Output = Result<Vec<AddResponse>, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, F: Into<Form<'static>> + Send + 'async_trait, Self: 'async_trait,

Add files using multipart::Form Read more
Source§

fn add_path<'life0, 'async_trait, P>( &'life0 self, path: P, ) -> Pin<Box<dyn Future<Output = Result<Vec<AddResponse>, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, P: AsRef<Path> + Send + 'async_trait, Self: 'async_trait,

Add a path to Ipfs. Can be a file or directory. A hard limit of 128 open file descriptors is set such that any small additional files are stored in-memory. Read more
Source§

fn bitswap_ledger<'life0, 'life1, 'async_trait>( &'life0 self, peer: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<BitswapLedgerResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the current ledger for a peer. Read more
Source§

fn bitswap_reprovide<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Triggers a reprovide. Read more
Source§

fn bitswap_stat<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BitswapStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns some stats about the bitswap agent. Read more
Source§

fn bitswap_unwant<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove a given block from your wantlist. Read more
Source§

fn bitswap_wantlist<'life0, 'life1, 'async_trait>( &'life0 self, peer: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<BitswapWantlistResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Shows blocks on the wantlist for you or the specified peer. Read more
Source§

fn block_get( &self, hash: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Gets a raw IPFS block. Read more
Source§

fn block_put<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<BlockPutResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Store input as an IPFS block. Read more
Source§

fn block_put_with_options<'life0, 'async_trait, R>( &'life0 self, data: R, options: BlockPut<'async_trait>, ) -> Pin<Box<dyn Future<Output = Result<BlockPutResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Store input as an IPFS block with options. Read more
Source§

fn block_rm<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<BlockRmResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Removes an IPFS block. Read more
Source§

fn block_stat<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<BlockStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Prints information about a raw IPFS block. Read more
Source§

fn bootstrap_add_default<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BootstrapAddDefaultResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Add default peers to the bootstrap list. Read more
Source§

fn bootstrap_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BootstrapListResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Lists peers in bootstrap list. Read more
Source§

fn bootstrap_rm_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BootstrapRmAllResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Removes all peers in bootstrap list. Read more
Source§

fn cat( &self, path: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Returns the contents of an Ipfs object. Read more
Source§

fn cat_range( &self, path: &str, _offset: usize, _length: usize, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Returns the the specified range of bytes of an Ipfs object. Read more
Source§

fn commands<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CommandsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List available commands that the server accepts. Read more
Source§

fn config_get_string<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get ipfs config strings. Read more
Source§

fn config_get_bool<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get ipfs config booleans. Read more
Source§

fn config_get_json<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get ipfs config json. Read more
Source§

fn config_set_string<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Set ipfs config string. Read more
Source§

fn config_set_bool<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, value: bool, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Set ipfs config boolean. Read more
Source§

fn config_set_json<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ConfigResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Set ipfs config json. Read more
Source§

fn config_edit<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Opens the config file for editing (on the server). Read more
Source§

fn config_replace<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Replace the config file. Read more
Source§

fn config_show<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Show the current config of the server. Read more
Source§

fn dag_get( &self, path: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Returns information about a dag node in Ipfs. Read more
Source§

fn dag_get_with_options( &self, options: DagGet<'_>, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Returns information about a dag node in Ipfs with options. Read more
Source§

fn dag_put<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<DagPutResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add a DAG node to Ipfs. Read more
Source§

fn dag_put_with_options<'a, 'life0, 'async_trait, R>( &'life0 self, data: R, options: DagPut<'a>, ) -> Pin<Box<dyn Future<Output = Result<DagPutResponse, Self::Error>> + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add a DAG node to Ipfs with options. Read more
Source§

fn dht_findpeer( &self, peer: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Query the DHT for all of the multiaddresses associated with a Peer ID. Read more
Source§

fn dht_findprovs( &self, key: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Find peers in the DHT that can provide a specific value given a key. Read more
Source§

fn dht_get( &self, key: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Query the DHT for a given key. Read more
Source§

fn dht_provide( &self, key: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Announce to the network that you are providing a given value. Read more
Source§

fn dht_put( &self, key: &str, value: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Write a key/value pair to the DHT. Read more
Source§

fn dht_query( &self, peer: &str, ) -> Box<dyn Stream<Item = Result<DhtMessage, Self::Error>> + Unpin>

Find the closest peer given the peer ID by querying the DHT. Read more
Source§

fn diag_cmds_clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Clear inactive requests from the log. Read more
Source§

fn diag_cmds_set_time<'life0, 'life1, 'async_trait>( &'life0 self, time: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Set how long to keep inactive requests in the log. Read more
Source§

fn diag_sys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Print system diagnostic information. Read more
Source§

fn dns<'life0, 'life1, 'async_trait>( &'life0 self, link: &'life1 str, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<DnsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Resolve DNS link. Read more
Source§

fn file_ls<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<FileLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List directory for Unix filesystem objects. Read more
Source§

fn files_cp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 str, dest: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Copy files into MFS. Read more
Source§

fn files_cp_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesCp<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Copy files into MFS. Read more
Source§

fn files_flush<'life0, 'life1, 'async_trait>( &'life0 self, path: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Flush a path’s data to disk. Read more
Source§

fn files_ls<'life0, 'life1, 'async_trait>( &'life0 self, path: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<FilesLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List directories in MFS. Read more
Source§

fn files_ls_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesLs<'life1>, ) -> Pin<Box<dyn Future<Output = Result<FilesLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List directories in MFS.. Read more
Source§

fn files_mkdir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, parents: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Make directories in MFS. Read more
Source§

fn files_mkdir_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesMkdir<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Make directories in MFS. Read more
Source§

fn files_mv<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 str, dest: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Copy files into MFS. Read more
Source§

fn files_mv_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesMv<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Copy files into MFS. Read more
Source§

fn files_read( &self, path: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Read a file in MFS. Read more
Source§

fn files_read_with_options( &self, options: FilesRead<'_>, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Read a file in MFS. Read more
Source§

fn files_rm<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove a file in MFS. Read more
Source§

fn files_rm_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesRm<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove a file in MFS. Read more
Source§

fn files_stat<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<FilesStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Display a file’s status in MFS. Read more
Source§

fn files_stat_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesStat<'life1>, ) -> Pin<Box<dyn Future<Output = Result<FilesStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Display a file’s status in MFS. Read more
Source§

fn files_write<'life0, 'life1, 'async_trait, R>( &'life0 self, path: &'life1 str, create: bool, truncate: bool, data: R, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Write to a mutable file in the filesystem. Read more
Source§

fn files_write_with_options<'life0, 'life1, 'async_trait, R>( &'life0 self, options: FilesWrite<'life1>, data: R, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Write to a mutable file in the filesystem. Read more
Source§

fn files_chcid<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, cid_version: i32, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Change the cid version or hash function of the root node of a given path. Read more
Source§

fn files_chcid_with_options<'life0, 'life1, 'async_trait>( &'life0 self, options: FilesChcid<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Change the cid version or hash function of the root node of a given path. Read more
Source§

fn filestore_dups( &self, ) -> Box<dyn Stream<Item = Result<FilestoreDupsResponse, Self::Error>> + Unpin>

List blocks that are both in the filestore and standard block storage. Read more
Source§

fn filestore_ls( &self, cid: Option<&str>, ) -> Box<dyn Stream<Item = Result<FilestoreObject, Self::Error>> + Unpin>

List objects in filestore. Read more
Source§

fn filestore_verify( &self, cid: Option<&str>, ) -> Box<dyn Stream<Item = Result<FilestoreObject, Self::Error>> + Unpin>

Verify objects in filestore. Read more
Source§

fn get( &self, path: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Download Ipfs object. Read more
Source§

fn id<'life0, 'life1, 'async_trait>( &'life0 self, peer: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<IdResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns information about a peer. Read more
Source§

fn key_gen<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, kind: KeyType, size: i32, ) -> Pin<Box<dyn Future<Output = Result<KeyPair, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Create a new keypair. Read more
Source§

fn key_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<KeyPairList, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List all local keypairs. Read more
Source§

fn key_rename<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, new: &'life2 str, force: bool, ) -> Pin<Box<dyn Future<Output = Result<KeyRenameResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Rename a keypair. Read more
Source§

fn key_rm<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<KeyPairList, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Remove a keypair. Read more
Source§

fn log_level<'life0, 'life1, 'async_trait>( &'life0 self, logger: Logger<'life1>, level: LoggingLevel, ) -> Pin<Box<dyn Future<Output = Result<LogLevelResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Change the logging level for a logger. Read more
Source§

fn log_ls<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<LogLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List all logging subsystems. Read more
Source§

fn log_tail( &self, ) -> Box<dyn Stream<Item = Result<String, Self::Error>> + Unpin>

Read the event log. Read more
Source§

fn ls<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<LsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List the contents of an Ipfs multihash. Read more
Source§

fn ls_with_options( &self, options: Ls<'_>, ) -> Box<dyn Stream<Item = Result<LsResponse, Self::Error>> + Unpin>

List the contents of an Ipfs multihash. Read more
Source§

fn name_publish<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, path: &'life1 str, resolve: bool, lifetime: Option<&'life2 str>, ttl: Option<&'life3 str>, key: Option<&'life4 str>, ) -> Pin<Box<dyn Future<Output = Result<NamePublishResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait,

Publish an IPFS path to IPNS. Read more
Source§

fn name_resolve<'life0, 'life1, 'async_trait>( &'life0 self, name: Option<&'life1 str>, recursive: bool, nocache: bool, ) -> Pin<Box<dyn Future<Output = Result<NameResolveResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Resolve an IPNS name. Read more
Source§

fn object_data( &self, key: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Output the raw bytes of an Ipfs object. Read more
Source§

fn object_diff<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key0: &'life1 str, key1: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ObjectDiffResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Returns the diff of two Ipfs objects. Read more
Source§

fn object_get<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ObjectGetResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the data in an object. Read more
Returns the links that an object points to. Read more
Source§

fn object_new<'life0, 'async_trait>( &'life0 self, template: Option<ObjectTemplate>, ) -> Pin<Box<dyn Future<Output = Result<ObjectNewResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Create a new object. Read more
Add a directory link to an object. Read more
Source§

fn object_stat<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ObjectStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the stats for an object. Read more
Source§

fn pin_add<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<PinAddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Pins a new object. Read more
Source§

fn pin_ls<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, key: Option<&'life1 str>, typ: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<PinLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Returns a list of pinned objects in local storage. Read more
Source§

fn pin_rm<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<PinRmResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Removes a pinned object from local storage. Read more
Source§

fn ping( &self, peer: &str, count: Option<i32>, ) -> Box<dyn Stream<Item = Result<PingResponse, Self::Error>> + Unpin>

Pings a peer. Read more
Source§

fn pubsub_ls<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<PubsubLsResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List subscribed pubsub topics. Read more
Source§

fn pubsub_peers<'life0, 'async_trait, T>( &'life0 self, topic: Option<T>, ) -> Pin<Box<dyn Future<Output = Result<PubsubPeersResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, T: AsRef<[u8]> + Send + Sync + 'async_trait, Self: 'async_trait,

List peers that are being published to. Read more
Source§

fn pubsub_pub<'life0, 'async_trait, T, R>( &'life0 self, topic: T, data: R, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, T: AsRef<[u8]> + Send + Sync + 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Publish a message to a topic. Read more
Source§

fn pubsub_sub<T>( &self, topic: T, ) -> Box<dyn Stream<Item = Result<PubsubSubResponse, Self::Error>> + Unpin>
where T: AsRef<[u8]>,

Subscribes to a pubsub topic. Read more
Source§

fn refs_local( &self, ) -> Box<dyn Stream<Item = Result<RefsLocalResponse, Self::Error>> + Unpin>

Gets a list of local references. Read more
Source§

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Shutdown the Ipfs daemon. Read more
Source§

fn stats_bitswap<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BitswapStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns bitswap stats. Read more
Source§

fn stats_bw<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<StatsBwResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns bandwidth stats. Read more
Source§

fn stats_repo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<RepoStatResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns repo stats. Read more
Source§

fn swarm_addrs_local<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SwarmAddrsLocalResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a list of local addresses. Read more
Source§

fn swarm_connect<'life0, 'life1, 'async_trait>( &'life0 self, peer: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<SwarmConnectResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Connect to a given peer Read more
Source§

fn swarm_peers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SwarmPeersResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return a list of peers with open connections. Read more
Source§

fn tar_add<'life0, 'async_trait, R>( &'life0 self, data: R, ) -> Pin<Box<dyn Future<Output = Result<TarAddResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, R: 'static + Read + Send + Sync + Unpin + 'async_trait, Self: 'async_trait,

Add a tar file to Ipfs. Read more
Source§

fn tar_cat( &self, path: &str, ) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>

Export a tar file from Ipfs. Read more
Source§

fn version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<VersionResponse, Self::Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns information about the Ipfs server version. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T