pub enum Identifier<'a> {
Any,
Integer(u64),
String(Cow<'a, str>),
Bytes(Cow<'a, [u8]>),
}Expand description
A single element of a ResourceName
Variants§
Any
When checking for allowed permissions, allow any match where this identifier is used.
Integer(u64)
An integer identifier.
String(Cow<'a, str>)
A string identifier.
Bytes(Cow<'a, [u8]>)
A binary identifier.
Implementations§
Source§impl<'a> Identifier<'a>
impl<'a> Identifier<'a>
Sourcepub fn to_owned(&self) -> Identifier<'static>
pub fn to_owned(&self) -> Identifier<'static>
Convert this identifier to an un-borrowed identifier.
Trait Implementations§
Source§impl<'a> Clone for Identifier<'a>
impl<'a> Clone for Identifier<'a>
Source§fn clone(&self) -> Identifier<'a>
fn clone(&self) -> Identifier<'a>
Returns a duplicate 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 moreSource§impl<'a> Debug for Identifier<'a>
impl<'a> Debug for Identifier<'a>
Source§impl<'de, 'a> Deserialize<'de> for Identifier<'a>
impl<'de, 'a> Deserialize<'de> for Identifier<'a>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Identifier<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Identifier<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Display for Identifier<'a>
impl<'a> Display for Identifier<'a>
Source§impl<'a> From<&'a [u8]> for Identifier<'a>
impl<'a> From<&'a [u8]> for Identifier<'a>
Source§fn from(id: &'a [u8]) -> Identifier<'a>
fn from(id: &'a [u8]) -> Identifier<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a DocumentId> for Identifier<'a>
impl<'a> From<&'a DocumentId> for Identifier<'a>
Source§fn from(id: &'a DocumentId) -> Self
fn from(id: &'a DocumentId) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a String> for Identifier<'a>
impl<'a> From<&'a String> for Identifier<'a>
Source§fn from(id: &'a String) -> Identifier<'a>
fn from(id: &'a String) -> Identifier<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for Identifier<'a>
impl<'a> From<&'a str> for Identifier<'a>
Source§fn from(id: &'a str) -> Identifier<'a>
fn from(id: &'a str) -> Identifier<'a>
Converts to this type from the input type.
Source§impl<'a> From<DocumentId> for Identifier<'a>
impl<'a> From<DocumentId> for Identifier<'a>
Source§fn from(id: DocumentId) -> Self
fn from(id: DocumentId) -> Self
Converts to this type from the input type.
Source§impl<'a> From<String> for Identifier<'a>
impl<'a> From<String> for Identifier<'a>
Source§fn from(id: String) -> Identifier<'a>
fn from(id: String) -> Identifier<'a>
Converts to this type from the input type.
Source§impl<'a> From<u64> for Identifier<'a>
impl<'a> From<u64> for Identifier<'a>
Source§fn from(id: u64) -> Identifier<'a>
fn from(id: u64) -> Identifier<'a>
Converts to this type from the input type.
Source§impl<'a> Hash for Identifier<'a>
impl<'a> Hash for Identifier<'a>
Source§impl<'a> PartialEq for Identifier<'a>
impl<'a> PartialEq for Identifier<'a>
Source§impl<'a> Serialize for Identifier<'a>
impl<'a> Serialize for Identifier<'a>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'a> Eq for Identifier<'a>
Auto Trait Implementations§
impl<'a> Freeze for Identifier<'a>
impl<'a> RefUnwindSafe for Identifier<'a>
impl<'a> Send for Identifier<'a>
impl<'a> Sync for Identifier<'a>
impl<'a> Unpin for Identifier<'a>
impl<'a> UnwindSafe for Identifier<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more