Enum substrait_validator::output::path::PathElement
source · [−]pub enum PathElement {
Field(String),
Repeated(String, usize),
Variant(String, String),
Index(usize),
}Expand description
Element of a path to some field of a protobuf message and/or YAML file.
Variants
Field(String)
Refers to an optional protobuf field with the given name within the message, or a YAML map entry with the given key.
Repeated(String, usize)
Refers to one of the elements of a repeated field with the given name within the message referred to by the parent path.
Variant(String, String)
Refers to the selected variant of a OneOf field with the given name within the message referred to by the parent path. The first str is the field name, the second is the variant name.
Index(usize)
Refers to an indexed element within a YAML array.
Implementations
sourceimpl PathElement
impl PathElement
sourcepub fn to_string_without_dot(&self) -> String
pub fn to_string_without_dot(&self) -> String
Same as to_string(), but doesn’t include the dot prefix for the variants that would normally have one.
Trait Implementations
sourceimpl Clone for PathElement
impl Clone for PathElement
sourcefn clone(&self) -> PathElement
fn clone(&self) -> PathElement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for PathElement
impl Debug for PathElement
sourceimpl Display for PathElement
impl Display for PathElement
sourceimpl From<&'_ PathElement> for Element
impl From<&'_ PathElement> for Element
sourcefn from(node: &PathElement) -> Self
fn from(node: &PathElement) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<PathElement> for PathElement
impl PartialEq<PathElement> for PathElement
sourcefn eq(&self, other: &PathElement) -> bool
fn eq(&self, other: &PathElement) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PathElement) -> bool
fn ne(&self, other: &PathElement) -> bool
This method tests for !=.
impl StructuralPartialEq for PathElement
Auto Trait Implementations
impl RefUnwindSafe for PathElement
impl Send for PathElement
impl Sync for PathElement
impl Unpin for PathElement
impl UnwindSafe for PathElement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more