[−][src]Struct bracket::parser::ast::Component
Components form part of a path.
Implementations
impl<'source> Component<'source>
[src]
pub fn is_root(&self) -> bool
[src]
Determine if this is the special @root
component.
pub fn kind(&self) -> &ComponentType
[src]
Get the kind of this component.
pub fn span(&self) -> &Range<usize>
[src]
The span for this component.
pub fn is_local(&self) -> bool
[src]
Determine if this component is a local identifier; begins
with an @
symbol.
pub fn is_identifier(&self) -> bool
[src]
Determine if this component is an identifier.
pub fn is_explicit(&self) -> bool
[src]
Determine if this component uses an explicit this reference;
the reference may be the keyword this
or ./
.
pub fn is_explicit_dot_slash(&self) -> bool
[src]
Determine if this component uses and explicit dot slash (./
)
reference.
This is used by the path parser to determine if the next expected token should be a path delimiter or identifier.
Trait Implementations
impl<'_> Debug for Component<'_>
[src]
impl<'_> Display for Component<'_>
[src]
impl<'source> Eq for Component<'source>
[src]
impl<'source> PartialEq<Component<'source>> for Component<'source>
[src]
fn eq(&self, other: &Component<'source>) -> bool
[src]
fn ne(&self, other: &Component<'source>) -> bool
[src]
impl<'source> Slice<'source> for Component<'source>
[src]
impl<'source> StructuralEq for Component<'source>
[src]
impl<'source> StructuralPartialEq for Component<'source>
[src]
Auto Trait Implementations
impl<'source> RefUnwindSafe for Component<'source>
impl<'source> Send for Component<'source>
impl<'source> Sync for Component<'source>
impl<'source> Unpin for Component<'source>
impl<'source> UnwindSafe for Component<'source>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,