Struct mal_api::oauth::MalClientId
source · pub struct MalClientId(pub ClientId);
Expand description
If you only need to access public information on MAL that does not require an Oauth access token, you can use the MalClientId as your authorization client
Tuple Fields§
§0: ClientId
Implementations§
source§impl MalClientId
impl MalClientId
sourcepub fn new(id: String) -> Self
pub fn new(id: String) -> Self
Create a MalClientId by passing in your ClientId as a string
Useful if you want to control how your program fetches your MAL MAL_CLIENT_ID
sourcepub fn from_env() -> Result<Self, OauthError>
pub fn from_env() -> Result<Self, OauthError>
Try to load your MAL ClientId from the environment variable MAL_CLIENT_ID
Trait Implementations§
source§impl Clone for MalClientId
impl Clone for MalClientId
source§fn clone(&self) -> MalClientId
fn clone(&self) -> MalClientId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for MalClientId
impl Send for MalClientId
impl Sync for MalClientId
impl Unpin for MalClientId
impl UnwindSafe for MalClientId
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