pub struct Client { /* private fields */ }Expand description
Main Client struct
Implementations§
Source§impl Client
impl Client
Sourcepub async fn authenticate(&mut self, auth: Auth) -> Result<Self, ApiError>
pub async fn authenticate(&mut self, auth: Auth) -> Result<Self, ApiError>
Authenticates with an Auth enum value
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Checks if the instance is authenticated
Sourcepub async fn user(&self) -> Result<UserHandler, ApiError>
pub async fn user(&self) -> Result<UserHandler, ApiError>
Returns a wrapper around User methods
Sourcepub fn posts(&self) -> PostHandler
pub fn posts(&self) -> PostHandler
Returns a wrapper around Post methods
Sourcepub fn collections(&self) -> CollectionHandler
pub fn collections(&self) -> CollectionHandler
Returns a wrapper around Collection methods
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Client
impl<'de> Deserialize<'de> for Client
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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