pub enum VariantPathElement<'a> {
Field {
name: Cow<'a, str>,
},
Index {
index: usize,
},
ListElement,
}Expand description
Element of a VariantPath that can be a field name, an index, or a list element wildcard.
See VariantPath for more details and examples.
Variants§
Field
Access field with name name
Index
Access the list element at index
ListElement
Match the shared element schema of a list ([*])
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>
pub fn list_element() -> 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 (const: unstable) · 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 From<String> for VariantPathElement<'_>
impl From<String> for VariantPathElement<'_>
Source§impl From<usize> for VariantPathElement<'_>
impl From<usize> for VariantPathElement<'_>
Source§impl<'a> FromIterator<VariantPathElement<'a>> for VariantPath<'a>
Create from iter
impl<'a> FromIterator<VariantPathElement<'a>> for VariantPath<'a>
Create from iter
Source§fn from_iter<T: IntoIterator<Item = VariantPathElement<'a>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = VariantPathElement<'a>>>(iter: T) -> Self
Creates a value from an iterator. Read more
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> UnsafeUnpin 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