enum ChainItemKind {
Parent {
expr: Expr,
parens: bool,
},
MethodCall(PathSegment, Vec<GenericArg>, ThinVec<Box<Expr>>),
StructField(Ident),
TupleField {
field: Ident,
is_nested: bool,
},
Await,
Use,
Yield,
Comment(String, CommentPosition),
}Variants§
Parent
MethodCall(PathSegment, Vec<GenericArg>, ThinVec<Box<Expr>>)
StructField(Ident)
TupleField
Tuple field access like foo.1.
Await
Use
Yield
Comment(String, CommentPosition)
A comment within a chain, e.g. parent. item /* comment */.rest.
Implementations§
Source§impl ChainItemKind
impl ChainItemKind
fn is_block_like(&self, context: &RewriteContext<'_>, reps: &str) -> bool
fn is_tup_field_access_expr(expr: &Expr) -> bool
fn is_tup_field_ident(field: &Ident) -> bool
fn from_ast( context: &RewriteContext<'_>, expr: &Expr, is_postfix_receiver: bool, ) -> (ChainItemKind, Span)
Trait Implementations§
Auto Trait Implementations§
impl DynSend for ChainItemKindwhere
ThinVec<Box<Expr>>: DynSend,
Box<Expr>: DynSend,
Box<MethodCall>: DynSend,
Box<Ty>: DynSend,
Box<Pat>: DynSend,
Box<Block>: DynSend,
Box<ForLoop>: DynSend,
ThinVec<Arm>: DynSend,
Box<Closure>: DynSend,
Box<QSelf>: DynSend,
ThinVec<PathSegment>: DynSend,
Box<InlineAsm>: DynSend,
ThinVec<Ident>: DynSend,
Box<MacCall>: DynSend,
Box<StructExpr>: DynSend,
Box<FormatArgs>: DynSend,
ThinVec<Attribute>: DynSend,
Arc<LazyTokenStreamInner>: DynSend,
Box<GenericArgs>: DynSend,
Vec<GenericArg>: DynSend,
Vec<u8>: DynSend,
impl DynSync for ChainItemKindwhere
ThinVec<Box<Expr>>: DynSync,
Box<Expr>: DynSync,
Box<MethodCall>: DynSync,
Box<Ty>: DynSync,
Box<Pat>: DynSync,
Box<Block>: DynSync,
Box<ForLoop>: DynSync,
ThinVec<Arm>: DynSync,
Box<Closure>: DynSync,
Box<QSelf>: DynSync,
ThinVec<PathSegment>: DynSync,
Box<InlineAsm>: DynSync,
ThinVec<Ident>: DynSync,
Box<MacCall>: DynSync,
Box<StructExpr>: DynSync,
Box<FormatArgs>: DynSync,
ThinVec<Attribute>: DynSync,
Arc<LazyTokenStreamInner>: DynSync,
Box<GenericArgs>: DynSync,
Vec<GenericArg>: DynSync,
Vec<u8>: DynSync,
impl Forget for ChainItemKind
impl Freeze for ChainItemKindwhere
*const Header is !null: Freeze,
PhantomData<Box<Expr>>: Freeze,
*const Expr is !null: Freeze,
PhantomData<Expr>: Freeze,
*const MethodCall is !null: Freeze,
PhantomData<MethodCall>: Freeze,
*const Ty is !null: Freeze,
PhantomData<Ty>: Freeze,
*const Pat is !null: Freeze,
PhantomData<Pat>: Freeze,
*const Block is !null: Freeze,
PhantomData<Block>: Freeze,
*const ForLoop is !null: Freeze,
PhantomData<ForLoop>: Freeze,
PhantomData<Arm>: Freeze,
*const Closure is !null: Freeze,
PhantomData<Closure>: Freeze,
*const QSelf is !null: Freeze,
PhantomData<QSelf>: Freeze,
PhantomData<PathSegment>: Freeze,
*const InlineAsm is !null: Freeze,
PhantomData<InlineAsm>: Freeze,
PhantomData<Ident>: Freeze,
*const MacCall is !null: Freeze,
PhantomData<MacCall>: Freeze,
*const StructExpr is !null: Freeze,
PhantomData<StructExpr>: Freeze,
*const FormatArgs is !null: Freeze,
PhantomData<FormatArgs>: Freeze,
PhantomData<Attribute>: Freeze,
*const ArcInner<LazyTokenStreamInner> is !null: Freeze,
PhantomData<ArcInner<LazyTokenStreamInner>>: Freeze,
*const GenericArgs is !null: Freeze,
PhantomData<GenericArgs>: Freeze,
*const u8 is !null: Freeze,
PhantomData<GenericArg>: Freeze,
PhantomData<u8>: Freeze,
impl Move for ChainItemKind
impl RefUnwindSafe for ChainItemKind
impl Send for ChainItemKindwhere
ThinVec<Box<Expr>>: Send,
BoxRaw<Expr>: Send,
BoxRaw<MethodCall>: Send,
BoxRaw<Ty>: Send,
BoxRaw<Pat>: Send,
BoxRaw<Block>: Send,
BoxRaw<ForLoop>: Send,
ThinVec<Arm>: Send,
BoxRaw<Closure>: Send,
BoxRaw<QSelf>: Send,
ThinVec<PathSegment>: Send,
BoxRaw<InlineAsm>: Send,
ThinVec<Ident>: Send,
BoxRaw<MacCall>: Send,
BoxRaw<StructExpr>: Send,
BoxRaw<FormatArgs>: Send,
ThinVec<Attribute>: Send,
Arc<LazyTokenStreamInner>: Send,
BoxRaw<GenericArgs>: Send,
RawVecInner: Send,
impl Sync for ChainItemKindwhere
ThinVec<Box<Expr>>: Sync,
BoxRaw<Expr>: Sync,
BoxRaw<MethodCall>: Sync,
BoxRaw<Ty>: Sync,
BoxRaw<Pat>: Sync,
BoxRaw<Block>: Sync,
BoxRaw<ForLoop>: Sync,
ThinVec<Arm>: Sync,
BoxRaw<Closure>: Sync,
BoxRaw<QSelf>: Sync,
ThinVec<PathSegment>: Sync,
BoxRaw<InlineAsm>: Sync,
ThinVec<Ident>: Sync,
BoxRaw<MacCall>: Sync,
BoxRaw<StructExpr>: Sync,
BoxRaw<FormatArgs>: Sync,
ThinVec<Attribute>: Sync,
Arc<LazyTokenStreamInner>: Sync,
BoxRaw<GenericArgs>: Sync,
RawVecInner: Sync,
impl Unpin for ChainItemKindwhere
*const Header is !null: Unpin,
Box<Expr>: Unpin,
Box<MethodCall>: Unpin,
Box<Ty>: Unpin,
Box<Pat>: Unpin,
Box<Block>: Unpin,
Box<ForLoop>: Unpin,
Box<NormalAttr>: Unpin,
Box<SyntheticAttr>: Unpin,
Box<Guard>: Unpin,
Box<Closure>: Unpin,
Box<QSelf>: Unpin,
Box<GenericArgs>: Unpin,
Box<InlineAsm>: Unpin,
Box<MacCall>: Unpin,
Box<StructExpr>: Unpin,
Box<FormatArgs>: Unpin,
Arc<LazyTokenStreamInner>: Unpin,
*const u8 is !null: Unpin,
impl UnsafeUnpin for ChainItemKindwhere
*const Header is !null: UnsafeUnpin,
PhantomData<Box<Expr>>: UnsafeUnpin,
*const Expr is !null: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
*const MethodCall is !null: UnsafeUnpin,
PhantomData<MethodCall>: UnsafeUnpin,
*const Ty is !null: UnsafeUnpin,
PhantomData<Ty>: UnsafeUnpin,
*const Pat is !null: UnsafeUnpin,
PhantomData<Pat>: UnsafeUnpin,
*const Block is !null: UnsafeUnpin,
PhantomData<Block>: UnsafeUnpin,
*const ForLoop is !null: UnsafeUnpin,
PhantomData<ForLoop>: UnsafeUnpin,
PhantomData<Arm>: UnsafeUnpin,
*const Closure is !null: UnsafeUnpin,
PhantomData<Closure>: UnsafeUnpin,
*const QSelf is !null: UnsafeUnpin,
PhantomData<QSelf>: UnsafeUnpin,
PhantomData<PathSegment>: UnsafeUnpin,
*const InlineAsm is !null: UnsafeUnpin,
PhantomData<InlineAsm>: UnsafeUnpin,
PhantomData<Ident>: UnsafeUnpin,
*const MacCall is !null: UnsafeUnpin,
PhantomData<MacCall>: UnsafeUnpin,
*const StructExpr is !null: UnsafeUnpin,
PhantomData<StructExpr>: UnsafeUnpin,
*const FormatArgs is !null: UnsafeUnpin,
PhantomData<FormatArgs>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
*const ArcInner<LazyTokenStreamInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<LazyTokenStreamInner>>: UnsafeUnpin,
*const GenericArgs is !null: UnsafeUnpin,
PhantomData<GenericArgs>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<GenericArg>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for ChainItemKindwhere
NonNull<Header>: UnwindSafe,
BoxRaw<Expr>: UnwindSafe,
BoxRaw<MethodCall>: UnwindSafe,
BoxRaw<Ty>: UnwindSafe,
BoxRaw<Pat>: UnwindSafe,
BoxRaw<Block>: UnwindSafe,
BoxRaw<ForLoop>: UnwindSafe,
BoxRaw<NormalAttr>: UnwindSafe,
BoxRaw<SyntheticAttr>: UnwindSafe,
BoxRaw<Guard>: UnwindSafe,
BoxRaw<Closure>: UnwindSafe,
BoxRaw<QSelf>: UnwindSafe,
BoxRaw<GenericArgs>: UnwindSafe,
BoxRaw<InlineAsm>: UnwindSafe,
BoxRaw<MacCall>: UnwindSafe,
BoxRaw<StructExpr>: UnwindSafe,
BoxRaw<FormatArgs>: UnwindSafe,
Arc<LazyTokenStreamInner>: UnwindSafe,
RawVecInner: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes
Size for each variant:
Parent: 71 bytesMethodCall: 63 bytesStructField: 15 bytesTupleField: 15 bytesAwait: 0 bytesUse: 0 bytesYield: 0 bytesComment: 31 bytes