pub enum Either<A, B> {
A(A),
B(B),
}Variants§
Trait Implementations§
Source§impl<A: IntoTokenTree, B: IntoTokenTree> IntoTokenTree for Either<A, B>
impl<A: IntoTokenTree, B: IntoTokenTree> IntoTokenTree for Either<A, B>
Source§fn into_token_tree(self) -> TokenTree
fn into_token_tree(self) -> TokenTree
Available on crate feature
proc-macro only.Source§fn into_token_tree2(self) -> TokenTree
fn into_token_tree2(self) -> TokenTree
Available on crate feature
proc-macro2 only.Source§impl<A: IntoTokens, B: IntoTokens> IntoTokens for Either<A, B>
impl<A: IntoTokens, B: IntoTokens> IntoTokens for Either<A, B>
Source§fn into_tokens(self, ts: &mut TokenStream)
fn into_tokens(self, ts: &mut TokenStream)
Available on crate feature
proc-macro only.Source§fn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
Available on crate feature
proc-macro only.Source§fn into_tokens2(self, ts: &mut TokenStream)
fn into_tokens2(self, ts: &mut TokenStream)
Available on crate feature
proc-macro2 only.Source§fn into_token_stream2(self) -> TokenStream
fn into_token_stream2(self) -> TokenStream
Available on crate feature
proc-macro2 only.Source§impl<A: RefWithSpan, B: RefWithSpan> RefWithSpan for Either<A, B>
impl<A: RefWithSpan, B: RefWithSpan> RefWithSpan for Either<A, B>
type RefWithDefaultSpan<'a, S: Span> = Either<<A as RefWithSpan>::RefWithDefaultSpan<'a, S>, <B as RefWithSpan>::RefWithDefaultSpan<'a, S>> where Self: 'a
type RefWithReplacedSpan<'a, S: Span> = Either<<A as RefWithSpan>::RefWithReplacedSpan<'a, S>, <B as RefWithSpan>::RefWithReplacedSpan<'a, S>> where Self: 'a
fn ref_with_default_span<S: Span>( &self, span: S, ) -> Self::RefWithDefaultSpan<'_, S>
fn ref_with_replaced_span<S: Span>( &self, span: S, ) -> Self::RefWithReplacedSpan<'_, S>
Source§impl<A: ToTokenTree, B: ToTokenTree> ToTokenTree for Either<A, B>
impl<A: ToTokenTree, B: ToTokenTree> ToTokenTree for Either<A, B>
Source§fn to_token_tree(&self) -> TokenTree
fn to_token_tree(&self) -> TokenTree
Available on crate feature
proc-macro only.Source§fn to_token_tree2(&self) -> TokenTree
fn to_token_tree2(&self) -> TokenTree
Available on crate feature
proc-macro2 only.Source§impl<A: ToTokens, B: ToTokens> ToTokens for Either<A, B>
impl<A: ToTokens, B: ToTokens> ToTokens for Either<A, B>
Source§fn to_tokens(&self, ts: &mut TokenStream)
fn to_tokens(&self, ts: &mut TokenStream)
Available on crate feature
proc-macro only.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Available on crate feature
proc-macro only.Source§fn to_tokens2(&self, ts: &mut TokenStream)
fn to_tokens2(&self, ts: &mut TokenStream)
Available on crate feature
proc-macro2 only.Source§fn to_token_stream2(&self) -> TokenStream
fn to_token_stream2(&self) -> TokenStream
Available on crate feature
proc-macro2 only.Source§impl<A: WithSpan, B: WithSpan> WithSpan for Either<A, B>
impl<A: WithSpan, B: WithSpan> WithSpan for Either<A, B>
type WithDefaultSpan<S: Span> = Either<<A as WithSpan>::WithDefaultSpan<S>, <B as WithSpan>::WithDefaultSpan<S>>
type WithReplacedSpan<S: Span> = Either<<A as WithSpan>::WithReplacedSpan<S>, <B as WithSpan>::WithReplacedSpan<S>>
fn with_default_span<S: Span>(self, span: S) -> Self::WithDefaultSpan<S>
fn with_replaced_span<S: Span>(self, span: S) -> Self::WithReplacedSpan<S>
impl<A: Copy, B: Copy> Copy for Either<A, B>
impl<A: MaybeSpan, B: MaybeSpan> MaybeSpan for Either<A, B>
impl<A: Span, B: Span> Span for Either<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Either<A, B>
impl<A, B> RefUnwindSafe for Either<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Either<A, B>
impl<A, B> Sync for Either<A, B>
impl<A, B> Unpin for Either<A, B>
impl<A, B> UnsafeUnpin for Either<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Either<A, B>where
A: UnwindSafe,
B: 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