pub struct IpfsClient { /* private fields */ }Expand description
Client for the IPFS HTTP API.
Implementations§
Source§impl IpfsClient
impl IpfsClient
Sourcepub fn with_api_url(api_url: &str) -> Self
pub fn with_api_url(api_url: &str) -> Self
Connect to a custom IPFS API endpoint.
Sourcepub fn with_gateway(self, gateway_url: &str) -> Self
pub fn with_gateway(self, gateway_url: &str) -> Self
Set a custom public gateway URL for read-only fetches.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set request timeout.
Sourcepub fn gateway_url(&self) -> &str
pub fn gateway_url(&self) -> &str
Return the configured gateway URL.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IpfsClient
impl !RefUnwindSafe for IpfsClient
impl Send for IpfsClient
impl Sync for IpfsClient
impl Unpin for IpfsClient
impl UnsafeUnpin for IpfsClient
impl !UnwindSafe for IpfsClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more