pub struct IpfsManager { /* private fields */ }
Available on crate feature
ipfs
only.Implementations§
Source§impl IpfsManager
impl IpfsManager
pub fn from_env() -> Result<Self, SbError>
pub fn new(ipfs_url: &str, ipfs_key: &str, ipfs_secret: &str) -> Self
pub async fn get_bytes(&self, cid: String) -> Result<Vec<u8>, SbError>
pub async fn get_object<T>(&self, cid: String) -> Result<T, SbError>where
T: for<'a> Deserialize<'a> + Default,
pub async fn set_object<T>(&self, my_object: T) -> Result<String, SbError>
pub async fn set_object_async<T>(&self, my_object: T) -> Result<String, SbError>
Auto Trait Implementations§
impl !Freeze for IpfsManager
impl !RefUnwindSafe for IpfsManager
impl Send for IpfsManager
impl Sync for IpfsManager
impl Unpin for IpfsManager
impl !UnwindSafe for IpfsManager
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