Struct python_ast::tree::list::List
source · pub struct List<'a> {
pub elts: Vec<&'a PyAny>,
pub ctx: Option<String>,
}
Fields§
§elts: Vec<&'a PyAny>
§ctx: Option<String>
Trait Implementations§
source§impl<'a> CodeGen for List<'a>
impl<'a> CodeGen for List<'a>
§type Context = CodeGenContext
type Context = CodeGenContext
A type, generally an enum, that passes the code generator the context of the node.
§type Options = PythonOptions
type Options = PythonOptions
A struct representing the set of compilation options.
§type SymbolTable = SymbolTableScopes
type SymbolTable = SymbolTableScopes
A trait for a symbol table
source§fn to_rust(
self,
_ctx: Self::Context,
_options: Self::Options,
_symbols: Self::SymbolTable
) -> Result<TokenStream, Box<dyn Error>>
fn to_rust( self, _ctx: Self::Context, _options: Self::Options, _symbols: Self::SymbolTable ) -> Result<TokenStream, Box<dyn Error>>
A trait method to output Rust code in a general sense. The output should be stream of Rust tokens,
however, it is not guaranteed that it will fully compile because of scoping errors and other checks
that don’t occur until later.
source§fn find_symbols(self, symbols_in: Self::SymbolTable) -> Self::SymbolTable
fn find_symbols(self, symbols_in: Self::SymbolTable) -> Self::SymbolTable
A default implementation for find_symbols(), which simply returns the input.
Language nodes that modify the symbol table should override this method.
source§fn get_docstring(&self) -> Option<String>
fn get_docstring(&self) -> Option<String>
A trait method for extracting a docstring from an object that can have a docstring.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for List<'a>
impl<'a> !Send for List<'a>
impl<'a> !Sync for List<'a>
impl<'a> Unpin for List<'a>
impl<'a> !UnwindSafe for List<'a>
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