pub enum PostUnOp {
Increment(Plus, Plus),
Decrement(Minus, Minus),
}
Expand description
Postfix unary operators.
Variants§
Implementations§
Source§impl PostUnOp
impl PostUnOp
Sourcepub fn new_increment(span: Span) -> Self
pub fn new_increment(span: Span) -> Self
Creates a new Increment
operator with the given span
.
Sourcepub fn new_decrement(span: Span) -> Self
pub fn new_decrement(span: Span) -> Self
Creates a new Decrement
operator with the given span
.
pub fn peek(input: ParseStream<'_>, lookahead: &Lookahead1<'_>) -> bool
pub const fn as_str(self) -> &'static str
pub const fn as_debug_str(self) -> &'static str
Sourcepub const fn is_increment(self) -> bool
pub const fn is_increment(self) -> bool
Returns true if self
matches Self::Increment
.
Sourcepub const fn is_decrement(self) -> bool
pub const fn is_decrement(self) -> bool
Returns true if self
matches Self::Decrement
.
Trait Implementations§
Source§impl Spanned for PostUnOp
impl Spanned for PostUnOp
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.impl Copy for PostUnOp
impl Eq for PostUnOp
Auto Trait Implementations§
impl Freeze for PostUnOp
impl RefUnwindSafe for PostUnOp
impl !Send for PostUnOp
impl !Sync for PostUnOp
impl Unpin for PostUnOp
impl UnwindSafe for PostUnOp
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
)