pub struct SimplePath(_);
Expand description

Simple, allocation-free path representation

Implementations

Construct, verifying validity

If the first component is an empty string, this is treated as a leading colon (e.g. ["", "abc", "Def"] == ::abc::Def`). No other component may be empty. At least one non-empty component is required.

Panics if requirements are not met.

True if this matches a syn::Path

This must match the path exactly, with two exceptions:

  • if path has no leading colon but self does (empty first component), the paths may still match
  • if the first component of self is core or alloc but the first component of path is std, the paths may still match

True if the last component matches a syn::Ident

If input path has a single component with no leading colon, then match via Self::matches_ident; otherwise match via Self::matches.

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.