pub enum VariantPathElement<'a> {
Field {
name: Cow<'a, str>,
},
Index {
index: usize,
},
}
Expand description
Element of a VariantPath
that can be a field name or an index.
See VariantPath
for more details and examples.
Variants§
Implementations§
Source§impl<'a> VariantPathElement<'a>
impl<'a> VariantPathElement<'a>
pub fn field(name: impl Into<Cow<'a, str>>) -> VariantPathElement<'a>
pub fn index(index: usize) -> VariantPathElement<'a>
Trait Implementations§
Source§impl<'a> Clone for VariantPathElement<'a>
impl<'a> Clone for VariantPathElement<'a>
Source§fn clone(&self) -> VariantPathElement<'a>
fn clone(&self) -> VariantPathElement<'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 VariantPathElement<'a>
impl<'a> Debug for VariantPathElement<'a>
Source§impl<'a> From<&'a String> for VariantPathElement<'a>
impl<'a> From<&'a String> for VariantPathElement<'a>
Source§impl<'a> From<&'a str> for VariantPathElement<'a>
impl<'a> From<&'a str> for VariantPathElement<'a>
Source§impl<'a> From<String> for VariantPathElement<'a>
impl<'a> From<String> for VariantPathElement<'a>
Source§impl<'a> From<usize> for VariantPathElement<'a>
impl<'a> From<usize> for VariantPathElement<'a>
Source§impl<'a> PartialEq for VariantPathElement<'a>
impl<'a> PartialEq for VariantPathElement<'a>
impl<'a> StructuralPartialEq for VariantPathElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for VariantPathElement<'a>
impl<'a> RefUnwindSafe for VariantPathElement<'a>
impl<'a> Send for VariantPathElement<'a>
impl<'a> Sync for VariantPathElement<'a>
impl<'a> Unpin for VariantPathElement<'a>
impl<'a> UnwindSafe for VariantPathElement<'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