pub struct Client {
pub lang: Language,
/* private fields */
}
Expand description
Fields§
§lang: Language
Glide
APIs for /v1/language
endpoints.
Implementations§
Source§impl Client
impl Client
Sourcepub fn user_agent(&self) -> &str
pub fn user_agent(&self) -> &str
Returns the reference to the used User-Agent
header value.
Sourcepub fn client(&self) -> &RwClient
pub fn client(&self) -> &RwClient
Returns the underlying reqwest::Client
.
Trait Implementations§
Source§impl Default for Client
impl Default for Client
Source§fn default() -> Self
fn default() -> Self
Creates a new Client
from environment variables.
§Panics
- Panics if the environment variable
GLIDE_API_KEY
is set but is not a validString
. - Panics if the environment variable
GLIDE_BASE_URL
is set but is not a validURL
. - Panics if the environment variable
GLIDE_USER_AGENT
is set but is not a validString
.
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