Enum rune_core::ComponentRef
source · pub enum ComponentRef<'a> {
Crate(&'a str),
Str(&'a str),
Id(usize),
}Expand description
A reference to a component of an item.
All indexes refer to sibling indexes. So two sibling id components could
have the indexes 1 and 2 respectively.
Variants§
Crate(&'a str)
A crate string component.
Str(&'a str)
A regular string component.
Id(usize)
A nested anonymous part with an identifier.
Implementations§
Trait Implementations§
source§impl<'a> Clone for ComponentRef<'a>
impl<'a> Clone for ComponentRef<'a>
source§fn clone(&self) -> ComponentRef<'a>
fn clone(&self) -> ComponentRef<'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 moresource§impl<'a> Debug for ComponentRef<'a>
impl<'a> Debug for ComponentRef<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for ComponentRef<'a>
impl<'de: 'a, 'a> Deserialize<'de> for ComponentRef<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ComponentRef<'_>
impl Display for ComponentRef<'_>
source§impl<'a> Hash for ComponentRef<'a>
impl<'a> Hash for ComponentRef<'a>
source§impl IntoComponent for &ComponentRef<'_>
impl IntoComponent for &ComponentRef<'_>
source§fn as_component_ref(&self) -> ComponentRef<'_>
fn as_component_ref(&self) -> ComponentRef<'_>
Convert into a component directly.
source§fn into_component(self) -> Result<Component>
fn into_component(self) -> Result<Component>
Convert into component.
source§impl IntoComponent for ComponentRef<'_>
impl IntoComponent for ComponentRef<'_>
source§fn as_component_ref(&self) -> ComponentRef<'_>
fn as_component_ref(&self) -> ComponentRef<'_>
Convert into a component directly.
source§fn into_component(self) -> Result<Component>
fn into_component(self) -> Result<Component>
Convert into component.
source§impl<'a> Ord for ComponentRef<'a>
impl<'a> Ord for ComponentRef<'a>
source§fn cmp(&self, other: &ComponentRef<'a>) -> Ordering
fn cmp(&self, other: &ComponentRef<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq for ComponentRef<'a>
impl<'a> PartialEq for ComponentRef<'a>
source§fn eq(&self, other: &ComponentRef<'a>) -> bool
fn eq(&self, other: &ComponentRef<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> PartialOrd for ComponentRef<'a>
impl<'a> PartialOrd for ComponentRef<'a>
source§fn partial_cmp(&self, other: &ComponentRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &ComponentRef<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<'a> Serialize for ComponentRef<'a>
impl<'a> Serialize for ComponentRef<'a>
impl<'a> Copy for ComponentRef<'a>
impl<'a> Eq for ComponentRef<'a>
impl<'a> StructuralEq for ComponentRef<'a>
impl<'a> StructuralPartialEq for ComponentRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ComponentRef<'a>
impl<'a> Send for ComponentRef<'a>
impl<'a> Sync for ComponentRef<'a>
impl<'a> Unpin for ComponentRef<'a>
impl<'a> UnwindSafe for ComponentRef<'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