Struct AnyHasAttrs

Source
pub struct AnyHasAttrs { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl AstNode for AnyHasAttrs

Source§

fn can_cast(kind: SyntaxKind) -> bool

Source§

fn cast(syntax: SyntaxNode) -> Option<Self>

Source§

fn syntax(&self) -> &SyntaxNode

Source§

fn kind() -> SyntaxKind
where Self: Sized,

This panics if the SyntaxKind is not statically known.
Source§

fn clone_for_update(&self) -> Self
where Self: Sized,

Source§

fn clone_subtree(&self) -> Self
where Self: Sized,

Source§

impl Clone for AnyHasAttrs

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnyHasAttrs

Source§

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

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

impl From<ArrayExpr> for AnyHasAttrs

Source§

fn from(node: ArrayExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<AsmExpr> for AnyHasAttrs

Source§

fn from(node: AsmExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<AssocItem> for AnyHasAttrs

Source§

fn from(node: AssocItem) -> Self

Converts to this type from the input type.
Source§

impl From<AssocItemList> for AnyHasAttrs

Source§

fn from(node: AssocItemList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<AwaitExpr> for AnyHasAttrs

Source§

fn from(node: AwaitExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<BecomeExpr> for AnyHasAttrs

Source§

fn from(node: BecomeExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<BinExpr> for AnyHasAttrs

Source§

fn from(node: BinExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<BlockExpr> for AnyHasAttrs

Source§

fn from(node: BlockExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<BreakExpr> for AnyHasAttrs

Source§

fn from(node: BreakExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<CallExpr> for AnyHasAttrs

Source§

fn from(node: CallExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<CastExpr> for AnyHasAttrs

Source§

fn from(node: CastExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ClosureExpr> for AnyHasAttrs

Source§

fn from(node: ClosureExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Const> for AnyHasAttrs

Source§

fn from(node: Const) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ConstParam> for AnyHasAttrs

Source§

fn from(node: ConstParam) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ContinueExpr> for AnyHasAttrs

Source§

fn from(node: ContinueExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Enum> for AnyHasAttrs

Source§

fn from(node: Enum) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ExternBlock> for AnyHasAttrs

Source§

fn from(node: ExternBlock) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ExternCrate> for AnyHasAttrs

Source§

fn from(node: ExternCrate) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ExternItemList> for AnyHasAttrs

Source§

fn from(node: ExternItemList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<FieldExpr> for AnyHasAttrs

Source§

fn from(node: FieldExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Fn> for AnyHasAttrs

Source§

fn from(node: Fn) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ForExpr> for AnyHasAttrs

Source§

fn from(node: ForExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<FormatArgsExpr> for AnyHasAttrs

Source§

fn from(node: FormatArgsExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<IdentPat> for AnyHasAttrs

Source§

fn from(node: IdentPat) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<IfExpr> for AnyHasAttrs

Source§

fn from(node: IfExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Impl> for AnyHasAttrs

Source§

fn from(node: Impl) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<IndexExpr> for AnyHasAttrs

Source§

fn from(node: IndexExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Item> for AnyHasAttrs

Source§

fn from(node: Item) -> Self

Converts to this type from the input type.
Source§

impl From<ItemList> for AnyHasAttrs

Source§

fn from(node: ItemList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<LetExpr> for AnyHasAttrs

Source§

fn from(node: LetExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<LetStmt> for AnyHasAttrs

Source§

fn from(node: LetStmt) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<LifetimeParam> for AnyHasAttrs

Source§

fn from(node: LifetimeParam) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Literal> for AnyHasAttrs

Source§

fn from(node: Literal) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<LoopExpr> for AnyHasAttrs

Source§

fn from(node: LoopExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MacroCall> for AnyHasAttrs

Source§

fn from(node: MacroCall) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MacroDef> for AnyHasAttrs

Source§

fn from(node: MacroDef) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MacroRules> for AnyHasAttrs

Source§

fn from(node: MacroRules) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MatchArm> for AnyHasAttrs

Source§

fn from(node: MatchArm) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MatchArmList> for AnyHasAttrs

Source§

fn from(node: MatchArmList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MatchExpr> for AnyHasAttrs

Source§

fn from(node: MatchExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<MethodCallExpr> for AnyHasAttrs

Source§

fn from(node: MethodCallExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Module> for AnyHasAttrs

Source§

fn from(node: Module) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<OffsetOfExpr> for AnyHasAttrs

Source§

fn from(node: OffsetOfExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Param> for AnyHasAttrs

Source§

fn from(node: Param) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ParenExpr> for AnyHasAttrs

Source§

fn from(node: ParenExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<PathExpr> for AnyHasAttrs

Source§

fn from(node: PathExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<PrefixExpr> for AnyHasAttrs

Source§

fn from(node: PrefixExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RangeExpr> for AnyHasAttrs

Source§

fn from(node: RangeExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RecordExprField> for AnyHasAttrs

Source§

fn from(node: RecordExprField) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RecordExprFieldList> for AnyHasAttrs

Source§

fn from(node: RecordExprFieldList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RecordField> for AnyHasAttrs

Source§

fn from(node: RecordField) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RecordPatField> for AnyHasAttrs

Source§

fn from(node: RecordPatField) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RefExpr> for AnyHasAttrs

Source§

fn from(node: RefExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<RestPat> for AnyHasAttrs

Source§

fn from(node: RestPat) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<ReturnExpr> for AnyHasAttrs

Source§

fn from(node: ReturnExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<SelfParam> for AnyHasAttrs

Source§

fn from(node: SelfParam) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<SourceFile> for AnyHasAttrs

Source§

fn from(node: SourceFile) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Static> for AnyHasAttrs

Source§

fn from(node: Static) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<StmtList> for AnyHasAttrs

Source§

fn from(node: StmtList) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Struct> for AnyHasAttrs

Source§

fn from(node: Struct) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Trait> for AnyHasAttrs

Source§

fn from(node: Trait) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TraitAlias> for AnyHasAttrs

Source§

fn from(node: TraitAlias) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TryExpr> for AnyHasAttrs

Source§

fn from(node: TryExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TupleExpr> for AnyHasAttrs

Source§

fn from(node: TupleExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TupleField> for AnyHasAttrs

Source§

fn from(node: TupleField) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TypeAlias> for AnyHasAttrs

Source§

fn from(node: TypeAlias) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<TypeParam> for AnyHasAttrs

Source§

fn from(node: TypeParam) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<UnderscoreExpr> for AnyHasAttrs

Source§

fn from(node: UnderscoreExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Union> for AnyHasAttrs

Source§

fn from(node: Union) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Use> for AnyHasAttrs

Source§

fn from(node: Use) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<Variant> for AnyHasAttrs

Source§

fn from(node: Variant) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<WhileExpr> for AnyHasAttrs

Source§

fn from(node: WhileExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<YeetExpr> for AnyHasAttrs

Source§

fn from(node: YeetExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl From<YieldExpr> for AnyHasAttrs

Source§

fn from(node: YieldExpr) -> AnyHasAttrs

Converts to this type from the input type.
Source§

impl HasAttrs for AnyHasAttrs

Source§

fn attrs(&self) -> AstChildren<Attr>

Source§

fn has_atom_attr(&self, atom: &str) -> bool

Source§

fn attrs_including_inner(self) -> impl Iterator<Item = Attr>
where Self: Sized,

Returns all attributes of this node, including inner attributes that may not be directly under this node but under a child.
Source§

impl Hash for AnyHasAttrs

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AnyHasAttrs

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for AnyHasAttrs

Auto Trait Implementations§

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<N> AstNodeEdit for N
where N: AstNode + Clone,

Source§

fn indent_level(&self) -> IndentLevel

Source§

fn indent(&self, level: IndentLevel) -> Self

Source§

fn dedent(&self, level: IndentLevel) -> Self

Source§

fn reset_indent(&self) -> Self

Source§

impl<T> AttrsOwnerEdit for T
where T: HasAttrs,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<N> Indent for N
where N: AstNode + Clone,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> IntoBox<dyn Any> for T
where T: Any,

§

fn into_box(self) -> Box<dyn Any>

Convert self into the appropriate boxed form.
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more