pub struct ScopeTokenRef(/* private fields */);Expand description
A borrowed reference to a ScopeToken
A scope token as defined in RFC6749, Section 3.3
This type maintains an invariant that ensures that a value of this type cannot be constructed that contains invalid data.
The borrowed form of this type is generated by appending
Ref to the end of the owned form: ScopeTokenRef.
Implementations§
Source§impl ScopeTokenRef
impl ScopeTokenRef
Sourcepub fn from_str(raw: &str) -> Result<&Self, <ScopeToken as Validator>::Error>
pub fn from_str(raw: &str) -> Result<&Self, <ScopeToken as Validator>::Error>
Transparently reinterprets the string slice as a strongly-typed ScopeTokenRef if it conforms to ScopeToken
Sourcepub const unsafe fn from_str_unchecked(raw: &str) -> &Self
pub const unsafe fn from_str_unchecked(raw: &str) -> &Self
Transparently reinterprets the string slice as a strongly-typed ScopeTokenRef without validating
Sourcepub fn from_static(raw: &'static str) -> &'static Self
pub fn from_static(raw: &'static str) -> &'static Self
Transparently reinterprets the static string slice as a strongly-typed ScopeTokenRef if it conforms to ScopeToken
§Panics
This function will panic if the provided raw string is not valid.
Sourcepub fn into_owned(self: Box<ScopeTokenRef>) -> ScopeToken
pub fn into_owned(self: Box<ScopeTokenRef>) -> ScopeToken
Converts a Box<ScopeTokenRef> into a ScopeToken without copying or allocating