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
Trait Implementations§
Source§impl AsRef<ScopeTokenRef> for ScopeToken
impl AsRef<ScopeTokenRef> for ScopeToken
Source§fn as_ref(&self) -> &ScopeTokenRef
fn as_ref(&self) -> &ScopeTokenRef
Source§impl AsRef<str> for ScopeTokenRef
impl AsRef<str> for ScopeTokenRef
Source§impl Borrow<ScopeTokenRef> for ScopeToken
impl Borrow<ScopeTokenRef> for ScopeToken
Source§fn borrow(&self) -> &ScopeTokenRef
fn borrow(&self) -> &ScopeTokenRef
Source§impl Borrow<str> for ScopeTokenRef
impl Borrow<str> for ScopeTokenRef
Source§impl Debug for ScopeTokenRef
impl Debug for ScopeTokenRef
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a ScopeTokenRef
impl<'de: 'a, 'a> Deserialize<'de> for &'a ScopeTokenRef
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl<'de> Deserialize<'de> for Box<ScopeTokenRef>
impl<'de> Deserialize<'de> for Box<ScopeTokenRef>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for ScopeTokenRef
impl Display for ScopeTokenRef
Source§impl<'a, 'b: 'a> From<&'a Cow<'b, ScopeTokenRef>> for &'a ScopeTokenRef
impl<'a, 'b: 'a> From<&'a Cow<'b, ScopeTokenRef>> for &'a ScopeTokenRef
Source§fn from(r: &'a Cow<'b, ScopeTokenRef>) -> &'a ScopeTokenRef
fn from(r: &'a Cow<'b, ScopeTokenRef>) -> &'a ScopeTokenRef
Source§impl From<&ScopeTokenRef> for Arc<ScopeTokenRef>
impl From<&ScopeTokenRef> for Arc<ScopeTokenRef>
Source§fn from(r: &ScopeTokenRef) -> Self
fn from(r: &ScopeTokenRef) -> Self
Source§impl<'a> From<&'a ScopeTokenRef> for Cow<'a, ScopeTokenRef>
impl<'a> From<&'a ScopeTokenRef> for Cow<'a, ScopeTokenRef>
Source§fn from(r: &'a ScopeTokenRef) -> Self
fn from(r: &'a ScopeTokenRef) -> Self
Source§impl From<&ScopeTokenRef> for Rc<ScopeTokenRef>
impl From<&ScopeTokenRef> for Rc<ScopeTokenRef>
Source§fn from(r: &ScopeTokenRef) -> Self
fn from(r: &ScopeTokenRef) -> Self
Source§impl From<&ScopeTokenRef> for ScopeToken
impl From<&ScopeTokenRef> for ScopeToken
Source§fn from(s: &ScopeTokenRef) -> Self
fn from(s: &ScopeTokenRef) -> Self
Source§impl From<ScopeToken> for Box<ScopeTokenRef>
impl From<ScopeToken> for Box<ScopeTokenRef>
Source§fn from(r: ScopeToken) -> Self
fn from(r: ScopeToken) -> Self
Source§impl Hash for ScopeTokenRef
impl Hash for ScopeTokenRef
Source§impl Ord for ScopeTokenRef
impl Ord for ScopeTokenRef
Source§impl PartialEq<&ScopeTokenRef> for ScopeToken
impl PartialEq<&ScopeTokenRef> for ScopeToken
Source§fn eq(&self, other: &&ScopeTokenRef) -> bool
fn eq(&self, other: &&ScopeTokenRef) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<ScopeToken> for &ScopeTokenRef
impl PartialEq<ScopeToken> for &ScopeTokenRef
Source§fn eq(&self, other: &ScopeToken) -> bool
fn eq(&self, other: &ScopeToken) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<ScopeToken> for ScopeTokenRef
impl PartialEq<ScopeToken> for ScopeTokenRef
Source§fn eq(&self, other: &ScopeToken) -> bool
fn eq(&self, other: &ScopeToken) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<ScopeTokenRef> for ScopeToken
impl PartialEq<ScopeTokenRef> for ScopeToken
Source§fn eq(&self, other: &ScopeTokenRef) -> bool
fn eq(&self, other: &ScopeTokenRef) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq for ScopeTokenRef
impl PartialEq for ScopeTokenRef
Source§fn eq(&self, other: &ScopeTokenRef) -> bool
fn eq(&self, other: &ScopeTokenRef) -> bool
self and other values to be equal, and is used by ==.