Struct bonsaidb_core::permissions::ResourceName
pub struct ResourceName<'a>(/* private fields */);
Expand description
A unique name/identifier of a resource.
Implementations§
§impl<'a> ResourceName<'a>
impl<'a> ResourceName<'a>
pub fn to_owned(&self) -> ResourceName<'static>
pub fn to_owned(&self) -> ResourceName<'static>
Convert a borrowed name to an un-borrwed name.
§impl<'a> ResourceName<'a>
impl<'a> ResourceName<'a>
pub fn any() -> ResourceName<'a>
pub fn any() -> ResourceName<'a>
Creates a ResourceName
that matches any identifier.
pub fn named<I>(name: I) -> ResourceName<'a>where
I: Into<Identifier<'a>>,
pub fn named<I>(name: I) -> ResourceName<'a>where
I: Into<Identifier<'a>>,
Creates a ResourceName
with name
.
pub fn and<I>(self, name: I) -> ResourceName<'a>where
I: Into<Identifier<'a>>,
pub fn and<I>(self, name: I) -> ResourceName<'a>where
I: Into<Identifier<'a>>,
Adds another name segment.
Trait Implementations§
§impl<'a> AsRef<[Identifier<'a>]> for ResourceName<'a>
impl<'a> AsRef<[Identifier<'a>]> for ResourceName<'a>
§fn as_ref(&self) -> &[Identifier<'a>]
fn as_ref(&self) -> &[Identifier<'a>]
Converts this type into a shared reference of the (usually inferred) input type.
§impl<'a> Clone for ResourceName<'a>
impl<'a> Clone for ResourceName<'a>
§fn clone(&self) -> ResourceName<'a>
fn clone(&self) -> ResourceName<'a>
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 more§impl<'a> Debug for ResourceName<'a>
impl<'a> Debug for ResourceName<'a>
§impl<'a> Default for ResourceName<'a>
impl<'a> Default for ResourceName<'a>
§fn default() -> ResourceName<'a>
fn default() -> ResourceName<'a>
Returns the “default value” for a type. Read more
§impl<'de, 'a> Deserialize<'de> for ResourceName<'a>
impl<'de, 'a> Deserialize<'de> for ResourceName<'a>
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ResourceName<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ResourceName<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<'a> Display for ResourceName<'a>
impl<'a> Display for ResourceName<'a>
§impl<'b, 'a> From<&'b [Identifier<'a>]> for ResourceName<'a>
impl<'b, 'a> From<&'b [Identifier<'a>]> for ResourceName<'a>
§fn from(parts: &'b [Identifier<'a>]) -> ResourceName<'a>
fn from(parts: &'b [Identifier<'a>]) -> ResourceName<'a>
Converts to this type from the input type.
§impl<'a> From<&'a str> for ResourceName<'a>
impl<'a> From<&'a str> for ResourceName<'a>
§fn from(name: &'a str) -> ResourceName<'a>
fn from(name: &'a str) -> ResourceName<'a>
Converts to this type from the input type.
§impl<'a> From<u64> for ResourceName<'a>
impl<'a> From<u64> for ResourceName<'a>
§fn from(name: u64) -> ResourceName<'a>
fn from(name: u64) -> ResourceName<'a>
Converts to this type from the input type.
§impl<'a> IntoIterator for ResourceName<'a>
impl<'a> IntoIterator for ResourceName<'a>
§type IntoIter = IntoIter<Identifier<'a>>
type IntoIter = IntoIter<Identifier<'a>>
Which kind of iterator are we turning this into?
§type Item = Identifier<'a>
type Item = Identifier<'a>
The type of the elements being iterated over.
§fn into_iter(self) -> <ResourceName<'a> as IntoIterator>::IntoIter
fn into_iter(self) -> <ResourceName<'a> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
§impl<'a> Serialize for ResourceName<'a>
impl<'a> Serialize for ResourceName<'a>
§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
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ResourceName<'a>
impl<'a> Send for ResourceName<'a>
impl<'a> Sync for ResourceName<'a>
impl<'a> Unpin for ResourceName<'a>
impl<'a> UnwindSafe for ResourceName<'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