pub struct Authentication {
pub token: String,
pub user_id: User,
}Expand description
racal::Queryable’s RequiredApiState.
With authentication
Fields§
§token: StringThe secret authentication token
user_id: UserThe user that the authentication token is for
Implementations§
Trait Implementations§
Source§impl ApiClient<Authentication> for AuthenticatedResonite
Available on crate feature http_client only.
impl ApiClient<Authentication> for AuthenticatedResonite
Available on crate feature
http_client only.Source§fn state(&self) -> &Authentication
fn state(&self) -> &Authentication
Gets the API state
Source§fn before_request<'life0, 'async_trait>(
&'life0 self,
req: RequestBuilder,
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn before_request<'life0, 'async_trait>(
&'life0 self,
req: RequestBuilder,
) -> Pin<Box<dyn Future<Output = Result<RequestBuilder, ApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A way to modify the request right before sending it Read more
Source§fn handle_response<'life0, 'async_trait, ReturnType, FromState, QueryableType>(
&'life0 self,
queryable: QueryableType,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<ReturnType, ApiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReturnType: DeserializeOwned + 'async_trait,
FromState: FromApiState<State> + 'async_trait,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
fn handle_response<'life0, 'async_trait, ReturnType, FromState, QueryableType>(
&'life0 self,
queryable: QueryableType,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<ReturnType, ApiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReturnType: DeserializeOwned + 'async_trait,
FromState: FromApiState<State> + 'async_trait,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
A way to modify the request after it’s been received Read more
Source§fn query<'life0, 'async_trait, ReturnType, FromState, QueryableType>(
&'life0 self,
queryable: QueryableType,
) -> Pin<Box<dyn Future<Output = Result<ReturnType, ApiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReturnType: DeserializeOwned + 'async_trait,
FromState: FromApiState<State> + 'async_trait,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
fn query<'life0, 'async_trait, ReturnType, FromState, QueryableType>(
&'life0 self,
queryable: QueryableType,
) -> Pin<Box<dyn Future<Output = Result<ReturnType, ApiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ReturnType: DeserializeOwned + 'async_trait,
FromState: FromApiState<State> + 'async_trait,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
Creates a query
Source§fn build_request<ReturnType, FromState, QueryableType>(
http: &Client,
api_state: &FromState,
queryable: &QueryableType,
) -> Result<RequestBuilder, ApiError>where
ReturnType: DeserializeOwned,
FromState: FromApiState<State>,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync,
fn build_request<ReturnType, FromState, QueryableType>(
http: &Client,
api_state: &FromState,
queryable: &QueryableType,
) -> Result<RequestBuilder, ApiError>where
ReturnType: DeserializeOwned,
FromState: FromApiState<State>,
QueryableType: Queryable<FromState, ReturnType> + Send + Sync,
Builds the base request Read more
Source§impl BorshDeserialize for Authentication
impl BorshDeserialize for Authentication
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Authentication
impl BorshSerialize for Authentication
Source§impl Clone for Authentication
impl Clone for Authentication
Source§fn clone(&self) -> Authentication
fn clone(&self) -> Authentication
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Authentication
impl Debug for Authentication
Source§impl<'de> Deserialize<'de> for Authentication
impl<'de> Deserialize<'de> for Authentication
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
Source§impl From<UserSession> for Authentication
impl From<UserSession> for Authentication
Source§fn from(value: UserSession) -> Self
fn from(value: UserSession) -> Self
Converts to this type from the input type.
Source§impl FromApiState<Authentication> for Authentication
impl FromApiState<Authentication> for Authentication
Source§fn from_state(state: &Self) -> &Self
fn from_state(state: &Self) -> &Self
Gets the wanted state (
Self) from the current ApiState,
by borrowing if possibleSource§impl FromApiState<Authentication> for NoAuthentication
impl FromApiState<Authentication> for NoAuthentication
Source§fn from_state(_: &Authentication) -> &Self
fn from_state(_: &Authentication) -> &Self
Gets the wanted state (
Self) from the current ApiState,
by borrowing if possibleSource§impl Hash for Authentication
impl Hash for Authentication
Source§impl PartialEq for Authentication
impl PartialEq for Authentication
Source§impl Queryable<Authentication, ()> for ExtendUserSession
impl Queryable<Authentication, ()> for ExtendUserSession
Source§fn url(&self, _: &Authentication) -> String
fn url(&self, _: &Authentication) -> String
The URL of the request
Source§fn method(&self, _: &Authentication) -> RequestMethod
fn method(&self, _: &Authentication) -> RequestMethod
The method to use for the request Read more
Source§impl Queryable<Authentication, Message> for Message
Send a message
impl Queryable<Authentication, Message> for Message
Send a message
Source§fn url(&self, _: &Authentication) -> String
fn url(&self, _: &Authentication) -> String
The URL of the request
Source§fn body(&self, _state: &Authentication) -> Option<Result<Vec<u8>>>
fn body(&self, _state: &Authentication) -> Option<Result<Vec<u8>>>
Creates a JSON body for the request Read more
Source§fn method(&self, _state: &Authentication) -> RequestMethod
fn method(&self, _state: &Authentication) -> RequestMethod
The method to use for the request Read more
Source§impl Queryable<Authentication, Vec<Contact>> for Contacts
impl Queryable<Authentication, Vec<Contact>> for Contacts
Source§fn url(&self, auth: &Authentication) -> String
fn url(&self, auth: &Authentication) -> String
The URL of the request
Source§fn method(&self, _state: &RequiredApiState) -> RequestMethod
fn method(&self, _state: &RequiredApiState) -> RequestMethod
The method to use for the request Read more
Source§impl Queryable<Authentication, Vec<Message>> for Messages
impl Queryable<Authentication, Vec<Message>> for Messages
Source§fn url(&self, auth: &Authentication) -> String
fn url(&self, auth: &Authentication) -> String
The URL of the request
Source§fn method(&self, _state: &RequiredApiState) -> RequestMethod
fn method(&self, _state: &RequiredApiState) -> RequestMethod
The method to use for the request Read more
Source§impl Serialize for Authentication
impl Serialize for Authentication
impl Eq for Authentication
impl StructuralPartialEq for Authentication
Auto Trait Implementations§
impl Freeze for Authentication
impl RefUnwindSafe for Authentication
impl Send for Authentication
impl Sync for Authentication
impl Unpin for Authentication
impl UnwindSafe for Authentication
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