Feature

Struct Feature 

Source
pub struct Feature<'tree> {
    pub location: Location,
    pub context: Option<Location>,
    /* private fields */
}
Expand description

Represents the result of a successful route.

Fields§

§location: Location

The exact location of the route result.

§context: Option<Location>

The “context” location for the route result. This is typically the surrounding mapping or list structure.

Implementations§

Source§

impl Feature<'_>

Source

pub fn parent(&self) -> Option<Feature<'_>>

Return this feature’s parent feature, if it has one.

Source

pub fn kind(&self) -> FeatureKind

Return this feature’s FeatureKind.

Trait Implementations§

Source§

impl<'tree> Debug for Feature<'tree>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'tree> From<Node<'tree>> for Feature<'tree>

Source§

fn from(node: Node<'tree>) -> Self

Converts to this type from the input type.
Source§

impl RangeBounds<usize> for &Feature<'_>

Source§

fn start_bound(&self) -> Bound<&usize>

Start index bound. Read more
Source§

fn end_bound(&self) -> Bound<&usize>

End index bound. Read more
1.35.0 · Source§

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
Source§

fn is_empty(&self) -> bool
where T: PartialOrd,

🔬This is a nightly-only experimental API. (range_bounds_is_empty)
Returns true if the range contains no items. One-sided ranges (RangeFrom, etc) always return false. Read more

Auto Trait Implementations§

§

impl<'tree> Freeze for Feature<'tree>

§

impl<'tree> RefUnwindSafe for Feature<'tree>

§

impl<'tree> Send for Feature<'tree>

§

impl<'tree> Sync for Feature<'tree>

§

impl<'tree> Unpin for Feature<'tree>

§

impl<'tree> UnwindSafe for Feature<'tree>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.