Struct vcd::Writer
[−]
[src]
pub struct Writer<'w> { // some fields omitted }
Struct wrapping an io::Write
with methods for writing VCD commands and data.
Methods
impl<'s> Writer<'s>
[src]
fn new(writer: &mut Write) -> Writer
Create a Writer, wrapping an io::Write
let mut buf = Vec::new(); let mut vcd = vcd::Writer::new(&mut buf);
fn header(&mut self, h: &Header) -> Result<()>
Write a header with the data from a Header
struct
fn comment(&mut self, v: &str) -> Result<()>
Write a $comment
command
fn date(&mut self, v: &str) -> Result<()>
Write a $date
command
fn version(&mut self, v: &str) -> Result<()>
Write a $version
command
fn timescale(&mut self, ts: u32, unit: TimescaleUnit) -> Result<()>
Write a $timescale
command
fn scope_def(&mut self, t: ScopeType, i: &str) -> Result<()>
Write a $scope
command
fn upscope(&mut self) -> Result<()>
Write an $upscope
command
fn scope(&mut self, s: &Scope) -> Result<()>
Write a $scope
command, a series of $var
commands, and an $upscope
commands from
a Scope
structure
fn var_def(&mut self, t: VarType, s: u32, i: IdCode, r: &str) -> Result<()>
Write a $var
command
fn var(&mut self, v: &Var) -> Result<()>
Write a $var
command from a Var
structure
fn enddefinitions(&mut self) -> Result<()>
Write a $enddefinitions
command
fn timestamp(&mut self, ts: u64) -> Result<()>
Write a #xxx
timestamp
fn change_scalar(&mut self, id: IdCode, v: Value) -> Result<()>
Write a change to a scalar variable
fn change_vector(&mut self, id: IdCode, v: &[Value]) -> Result<()>
Write a change to a vector variable
fn change_real(&mut self, id: IdCode, v: f64) -> Result<()>
Write a change to a real variable
fn begin(&mut self, c: SimulationCommand) -> Result<()>
Write the beginning of a simulation command
fn end(&mut self) -> Result<()>
Write an $end
to end a simulation command
fn command(&mut self, c: &Command) -> Result<()>
Write a command from a Command
enum as parsed by the parser.