pub struct Context<'a> {
pub base_url: &'a str,
pub client_id: &'a str,
pub oauth_token: Option<&'a str>,
}
Expand description
Represents the universal context for an API request.
This struct contains the information needed to make an API request, such as the base URL, client ID, and OAuth token if available.
Fields§
§base_url: &'a str
The base URL for the API.
client_id: &'a str
The client ID for the API.
oauth_token: Option<&'a str>
The OAuth token for the API, if requesting an authenticated endpoint.
Trait Implementations§
impl<'a> Copy for Context<'a>
impl<'a> Eq for Context<'a>
impl<'a> StructuralPartialEq for Context<'a>
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
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