pub struct ApiKey { /* private fields */ }Expand description
A parsed OpenApp API-key token.
Implementations§
Source§impl ApiKey
impl ApiKey
Sourcepub fn parse(token: impl Into<String>) -> Result<Self, TokenFormatError>
pub fn parse(token: impl Into<String>) -> Result<Self, TokenFormatError>
Parse a token string of the form {base_url}_openapp_{secret}.
§Errors
Returns a TokenFormatError if the token is empty, lacks the separator, has an
empty secret, or if base_url is not a parseable absolute URL.
Trait Implementations§
impl Eq for ApiKey
impl StructuralPartialEq for ApiKey
Auto Trait Implementations§
impl Freeze for ApiKey
impl RefUnwindSafe for ApiKey
impl Send for ApiKey
impl Sync for ApiKey
impl Unpin for ApiKey
impl UnsafeUnpin for ApiKey
impl UnwindSafe for ApiKey
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