Struct switchboard_on_demand::ipfs::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 !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§
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more