struct Chain {
parent: ChainItem,
children: Vec<ChainItem>,
}Fields§
§parent: ChainItem§children: Vec<ChainItem>Implementations§
Source§impl Chain
impl Chain
fn from_ast(expr: &Expr, context: &RewriteContext<'_>) -> Chain
fn make_subexpr_list(expr: &Expr, context: &RewriteContext<'_>) -> Vec<SubExpr>
fn pop_expr_chain(expr: &Expr, context: &RewriteContext<'_>) -> Option<SubExpr>
fn convert_try(expr: &Expr, context: &RewriteContext<'_>) -> Expr
Trait Implementations§
Source§impl Rewrite for Chain
impl Rewrite for Chain
Source§fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>
fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>
Rewrite self into shape.
fn rewrite_result( &self, context: &RewriteContext<'_>, shape: Shape, ) -> Result<String, RewriteError>
Auto Trait Implementations§
impl DynSend for Chainwhere
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,
Vec<ChainItem>: DynSend,
impl DynSync for Chainwhere
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,
Vec<ChainItem>: DynSync,
impl Forget for Chain
impl Freeze for Chainwhere
*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,
PhantomData<ChainItem>: Freeze,
impl Move for Chain
impl RefUnwindSafe for Chain
impl Send for Chainwhere
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 Chainwhere
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 Chainwhere
*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 Chainwhere
*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,
PhantomData<ChainItem>: UnsafeUnpin,
impl UnwindSafe for Chainwhere
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: 112 bytes