Struct switchboard_solana::IpfsManager
pub struct IpfsManager { /* private fields */ }
Implementations§
§impl IpfsManager
impl IpfsManager
pub fn from_env() -> Result<IpfsManager, SbError>
pub fn new(ipfs_url: &str, ipfs_key: &str, ipfs_secret: &str) -> IpfsManager
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 !RefUnwindSafe for IpfsManager
impl Send for IpfsManager
impl Sync for IpfsManager
impl Unpin for IpfsManager
impl !UnwindSafe for IpfsManager
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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