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> Deserialize<'de> for ComponentRef<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for ComponentRef<'a>where
'de: 'a,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComponentRef<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComponentRef<'a>, <__D as Deserializer<'de>>::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§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§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>
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> 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
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.