Enum rustpython_ast::ExprContext
source · pub enum ExprContext {
Load,
Store,
Del,
}
Expand description
See also expr_context
Variants§
Implementations§
source§impl ExprContext
impl ExprContext
source§impl ExprContext
impl ExprContext
pub const fn load(&self) -> Option<ExprContextLoad>
pub const fn store(&self) -> Option<ExprContextStore>
pub const fn del(&self) -> Option<ExprContextDel>
Trait Implementations§
source§impl Clone for ExprContext
impl Clone for ExprContext
source§fn clone(&self) -> ExprContext
fn clone(&self) -> ExprContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExprContext
impl Debug for ExprContext
source§impl<T, U> Foldable<T, U> for ExprContext
impl<T, U> Foldable<T, U> for ExprContext
source§impl<R> From<ExprContext> for Ast<R>
impl<R> From<ExprContext> for Ast<R>
source§fn from(node: ExprContext) -> Self
fn from(node: ExprContext) -> Self
Converts to this type from the input type.
source§impl From<ExprContextDel> for ExprContext
impl From<ExprContextDel> for ExprContext
source§fn from(_: ExprContextDel) -> Self
fn from(_: ExprContextDel) -> Self
Converts to this type from the input type.
source§impl From<ExprContextLoad> for ExprContext
impl From<ExprContextLoad> for ExprContext
source§fn from(_: ExprContextLoad) -> Self
fn from(_: ExprContextLoad) -> Self
Converts to this type from the input type.
source§impl From<ExprContextStore> for ExprContext
impl From<ExprContextStore> for ExprContext
source§fn from(_: ExprContextStore) -> Self
fn from(_: ExprContextStore) -> Self
Converts to this type from the input type.
source§impl Hash for ExprContext
impl Hash for ExprContext
source§impl Node for ExprContext
impl Node for ExprContext
source§impl PartialEq<ExprContext> for ExprContextDel
impl PartialEq<ExprContext> for ExprContextDel
source§impl PartialEq<ExprContext> for ExprContextLoad
impl PartialEq<ExprContext> for ExprContextLoad
source§impl PartialEq<ExprContext> for ExprContextStore
impl PartialEq<ExprContext> for ExprContextStore
source§impl PartialEq for ExprContext
impl PartialEq for ExprContext
impl Copy for ExprContext
impl Eq for ExprContext
impl StructuralPartialEq for ExprContext
Auto Trait Implementations§
impl Freeze for ExprContext
impl RefUnwindSafe for ExprContext
impl Send for ExprContext
impl Sync for ExprContext
impl Unpin for ExprContext
impl UnwindSafe for ExprContext
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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