Struct noosphere_api::client::Client
source · pub struct Client<K, S>where
K: KeyMaterial + Clone + 'static,
S: UcanStore,{
pub session: IdentifyResponse,
pub sphere_identity: String,
pub api_base: Url,
pub author: Author<K>,
pub store: S,
/* private fields */
}Fields
session: IdentifyResponsesphere_identity: Stringapi_base: Urlstore: SImplementations
sourceimpl<K, S> Client<K, S>where
K: KeyMaterial + Clone + 'static,
S: UcanStore,
impl<K, S> Client<K, S>where
K: KeyMaterial + Clone + 'static,
S: UcanStore,
pub async fn identify(
sphere_identity: &str,
api_base: &Url,
author: &Author<K>,
did_parser: &mut DidParser,
store: S
) -> Result<Client<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<K, S> !RefUnwindSafe for Client<K, S>
impl<K, S> Send for Client<K, S>
impl<K, S> Sync for Client<K, S>
impl<K, S> Unpin for Client<K, S>where
K: Unpin,
S: Unpin,
impl<K, S> !UnwindSafe for Client<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