pub struct Feature<'tree> {
pub location: Location,
pub context: Option<Location>,
/* private fields */
}Expand description
Represents the result of a successful route.
Fields§
§location: LocationThe 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<'_>
impl Feature<'_>
Sourcepub fn parent(&self) -> Option<Feature<'_>>
pub fn parent(&self) -> Option<Feature<'_>>
Return this feature’s parent feature, if it has one.
Sourcepub fn kind(&self) -> FeatureKind
pub fn kind(&self) -> FeatureKind
Return this feature’s FeatureKind.
Sourcepub fn is_multiline(&self) -> bool
pub fn is_multiline(&self) -> bool
Returns whether this feature spans multiple lines.
Trait Implementations§
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> 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