Trait ipfs_api::TryFromUri[][src]

pub trait TryFromUri: Sized {
    fn build_with_base_uri(uri: Uri) -> Self;

    fn from_str(uri: &str) -> Result<Self, InvalidUri> { ... }
fn from_host_and_port(
        scheme: Scheme,
        host: &str,
        port: u16
    ) -> Result<Self, Error> { ... }
fn from_ipv4(scheme: Scheme, addr: SocketAddrV4) -> Result<Self, Error> { ... }
fn from_ipv6(scheme: Scheme, addr: SocketAddrV6) -> Result<Self, Error> { ... }
fn from_socket(
        scheme: Scheme,
        socket_addr: SocketAddr
    ) -> Result<Self, Error> { ... }
fn from_multiaddr(multiaddr: Multiaddr) -> Result<Self, Error> { ... }
fn from_multiaddr_str(multiaddr: &str) -> Result<Self, Error> { ... }
fn from_ipfs_config() -> Option<Self> { ... } }

Required methods

fn build_with_base_uri(uri: Uri) -> Self[src]

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

Loading content...

Provided methods

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

Creates a new client from a str.

Note: This constructor will overwrite the path/query part of the URI.

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

Creates a new client from a host name and port.

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

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

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

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

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

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

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

Creates a new client from a multiaddr.

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

Creates a new client from a multiaddr.

fn from_ipfs_config() -> Option<Self>[src]

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

Loading content...

Implementors

impl TryFromUri for IpfsClient[src]

fn build_with_base_uri(uri: Uri) -> IpfsClient[src]

Creates a new IpfsClient for any given URI.

Loading content...