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

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

Convert self directly into a TokenStream object. 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.

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. Read more

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.