Struct noosphere_api::client::Client
source · pub struct Client<'a, K, S>where
K: KeyMaterial,
S: UcanStore,{
pub session: IdentifyResponse,
pub sphere_identity: String,
pub api_base: Url,
pub credential: &'a K,
pub authorization: Authorization,
pub store: S,
/* private fields */
}Fields
session: IdentifyResponsesphere_identity: Stringapi_base: Urlcredential: &'a Kstore: SImplementations
sourceimpl<'a, K, S> Client<'a, K, S>where
K: KeyMaterial,
S: UcanStore,
impl<'a, K, S> Client<'a, K, S>where
K: KeyMaterial,
S: UcanStore,
pub async fn identify(
sphere_identity: &str,
api_base: &Url,
credential: &'a K,
authorization: &Authorization,
did_parser: &mut DidParser,
store: S
) -> Result<Client<'a, K, S>>
pub async fn fetch(&self, params: &FetchParameters) -> Result<FetchResponse>
pub async fn push(&self, push_body: &PushBody) -> Result<PushResponse>
Auto Trait Implementations
impl<'a, K, S> !RefUnwindSafe for Client<'a, K, S>
impl<'a, K, S> Send for Client<'a, K, S>
impl<'a, K, S> Sync for Client<'a, K, S>
impl<'a, K, S> Unpin for Client<'a, K, S>where
S: Unpin,
impl<'a, K, S> !UnwindSafe for Client<'a, K, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more