pub struct Comprehension {
pub target: ExprType,
pub iter: ExprType,
pub ifs: Vec<ExprType>,
pub is_async: bool,
}
Expand description
A comprehension generator (for x in iter if condition)
Fields§
§target: ExprType
The target variable(s) (e.g., x in “for x in range(10)”)
iter: ExprType
The iterable expression (e.g., range(10) in “for x in range(10)”)
ifs: Vec<ExprType>
The conditions (if clauses)
is_async: bool
Whether this is an async comprehension
Trait Implementations§
Source§impl Clone for Comprehension
impl Clone for Comprehension
Source§fn clone(&self) -> Comprehension
fn clone(&self) -> Comprehension
Returns a duplicate 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 Comprehension
impl Debug for Comprehension
Source§impl<'de> Deserialize<'de> for Comprehension
impl<'de> Deserialize<'de> for Comprehension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> FromPyObject<'a> for Comprehension
impl<'a> FromPyObject<'a> for Comprehension
Source§impl PartialEq for Comprehension
impl PartialEq for Comprehension
Source§impl Serialize for Comprehension
impl Serialize for Comprehension
impl StructuralPartialEq for Comprehension
Auto Trait Implementations§
impl Freeze for Comprehension
impl RefUnwindSafe for Comprehension
impl Send for Comprehension
impl Sync for Comprehension
impl Unpin for Comprehension
impl UnwindSafe for Comprehension
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§impl<T> ErrorContext for Twhere
T: Debug,
impl<T> ErrorContext for Twhere
T: Debug,
Source§fn with_context(&self, operation: &str) -> String
fn with_context(&self, operation: &str) -> String
Generate a standardized error message with context.