Struct rustpython_vm::compiler::parser::ast::ExprListComp
source · pub struct ExprListComp<R = TextRange> {
pub range: R,
pub elt: Box<Expr<R>, Global>,
pub generators: Vec<Comprehension<R>, Global>,
}
Expand description
See also ListComp
Fields§
§range: R
§elt: Box<Expr<R>, Global>
§generators: Vec<Comprehension<R>, Global>
Trait Implementations§
source§impl<R> Clone for ExprListComp<R>where
R: Clone,
impl<R> Clone for ExprListComp<R>where R: Clone,
source§fn clone(&self) -> ExprListComp<R>
fn clone(&self) -> ExprListComp<R>
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<R> Debug for ExprListComp<R>where
R: Debug,
impl<R> Debug for ExprListComp<R>where R: Debug,
source§impl<T, U> Foldable<T, U> for ExprListComp<T>
impl<T, U> Foldable<T, U> for ExprListComp<T>
source§impl<R> From<ExprListComp<R>> for Ast<R>
impl<R> From<ExprListComp<R>> for Ast<R>
source§fn from(payload: ExprListComp<R>) -> Ast<R>
fn from(payload: ExprListComp<R>) -> Ast<R>
Converts to this type from the input type.
source§impl<R> From<ExprListComp<R>> for Expr<R>
impl<R> From<ExprListComp<R>> for Expr<R>
source§fn from(payload: ExprListComp<R>) -> Expr<R>
fn from(payload: ExprListComp<R>) -> Expr<R>
Converts to this type from the input type.
source§impl Located for ExprListComp<SourceRange>
impl Located for ExprListComp<SourceRange>
fn range(&self) -> SourceRange
fn location(&self) -> SourceLocation
fn end_location(&self) -> Option<SourceLocation>
source§impl LocatedMut for ExprListComp<SourceRange>
impl LocatedMut for ExprListComp<SourceRange>
fn range_mut(&mut self) -> &mut SourceRange
source§impl<R> Node for ExprListComp<R>
impl<R> Node for ExprListComp<R>
source§impl Parse for ExprListComp<TextRange>
impl Parse for ExprListComp<TextRange>
fn lex_starts_at( source: &str, offset: TextSize ) -> SoftKeywordTransformer<Lexer<Chars<'_>>>
fn parse_tokens( lxr: impl IntoIterator<Item = Result<(Tok, TextRange), LexicalError>>, source_path: &str ) -> Result<ExprListComp<TextRange>, BaseError<ParseErrorType>>
fn parse( source: &str, source_path: &str ) -> Result<Self, BaseError<ParseErrorType>>
fn parse_without_path(source: &str) -> Result<Self, BaseError<ParseErrorType>>
fn parse_starts_at( source: &str, source_path: &str, offset: TextSize ) -> Result<Self, BaseError<ParseErrorType>>
source§impl<R> PartialEq<ExprListComp<R>> for ExprListComp<R>where
R: PartialEq<R>,
impl<R> PartialEq<ExprListComp<R>> for ExprListComp<R>where R: PartialEq<R>,
source§fn eq(&self, other: &ExprListComp<R>) -> bool
fn eq(&self, other: &ExprListComp<R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Ranged for ExprListComp<TextRange>
impl Ranged for ExprListComp<TextRange>
impl<R> StructuralPartialEq for ExprListComp<R>
Auto Trait Implementations§
impl<R> RefUnwindSafe for ExprListComp<R>where R: RefUnwindSafe,
impl<R> Send for ExprListComp<R>where R: Send,
impl<R> Sync for ExprListComp<R>where R: Sync,
impl<R> Unpin for ExprListComp<R>where R: Unpin,
impl<R> UnwindSafe for ExprListComp<R>where R: 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