pub struct Operator {
pub path: Path,
pub paren_token: Paren,
pub args_raw: TokenStream,
pub args: Punctuated<Expr, Comma>,
pub singletons_referenced: Vec<Ident>,
}
Fields§
§path: Path
§paren_token: Paren
§args_raw: TokenStream
§args: Punctuated<Expr, Comma>
§singletons_referenced: Vec<Ident>
Implementations§
source§impl Operator
impl Operator
pub fn name(&self) -> Path
pub fn name_string(&self) -> String
pub fn type_arguments(&self) -> Option<&Punctuated<GenericArgument, Comma>>
pub fn args(&self) -> &Punctuated<Expr, Comma>
sourcepub fn to_pretty_string(&self) -> String
pub fn to_pretty_string(&self) -> String
Output the operator as a formatted string using prettyplease
.
Trait Implementations§
source§impl ToTokens for Operator
impl ToTokens for Operator
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl !Send for Operator
impl !Sync for Operator
impl Unpin for Operator
impl UnwindSafe for Operator
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moresource§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.