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§
Source§impl<'a> ComponentRef<'a>
impl<'a> ComponentRef<'a>
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§impl<'a> PartialOrd for ComponentRef<'a>
impl<'a> PartialOrd for ComponentRef<'a>
Source§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> StructuralPartialEq for ComponentRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ComponentRef<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)