pub struct Module {
pub doc: Doc,
pub future: Vec<Ident>,
pub imports: Vec<Import>,
pub body: Vec<Statement>,
}Expand description
A Python source file.
One module per IDL file. Python’s own unit of scope is the module, so unlike the Java tree there is no outer type everything nests inside: a top-level IDL declaration is a top-level Python statement.
Fields§
§doc: DocThe module docstring.
future: Vec<Ident>from __future__ import ..., which must precede every other
statement, so it is a field rather than one more import.
imports: Vec<Import>import lines, in written order.
body: Vec<Statement>The body, in written order.
Trait Implementations§
impl Eq for Module
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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