pub(crate) struct Node {Show 15 fields
pub stmt: Stmt,
pub defs: Vec<(Ident, bool)>,
pub acc: Access,
pub awaits: bool,
pub blocks: bool,
pub effect: bool,
pub exits: bool,
pub effects: Vec<Effect>,
pub unclassified: Vec<String>,
pub speculate: bool,
pub panics: bool,
pub independent: bool,
pub label: String,
pub line: usize,
pub end_line: usize,
}Expand description
A movable statement and what the analysis knows about it.
Fields§
§stmt: StmtThe statement as written.
defs: Vec<(Ident, bool)>Bindings it introduces, with their mut flag.
acc: AccessWhat it reads and writes.
awaits: boolIt awaits (outside nested closures and async blocks), or, in synchronous code, blocks.
blocks: boolSynchronous code: it blocks on the network or a process, or carries #[psync::par].
effect: boolAn ordinary statement with possible side effects: it keeps its order relative to other effects, and if it can exit early, later nodes wait for it.
exits: boolIt contains ?, return, break or continue that leave the statement.
effects: Vec<Effect>What it does to files, the network, services, processes and the environment.
unclassified: Vec<String>Awaited calls whose effect psync could not tell from their names.
speculate: bool#[psync::speculate]: its writes may run ahead of earlier exits.
panics: boolThe compiler says it may panic on purpose: an exit for the speculation rule.
independent: bool#[psync::independent] on the statement: its effects commute with the others in its
region (two writes to different objects through one client).
label: StringShort description for reports.
line: usizeSource line (0 when spans carry no location).
end_line: usizeLast source line of the statement.