[−][src]Struct vcd::Writer
Struct wrapping an io::Write
with methods for writing VCD commands and data.
Implementations
impl<'s> Writer<'s>
[src]
pub fn new(writer: &mut dyn Write) -> Writer
[src]
Creates a Writer, wrapping an io::Write.
let mut buf = Vec::new(); let mut vcd = vcd::Writer::new(&mut buf);
pub fn header(&mut self, h: &Header) -> Result<()>
[src]
Writes a complete header with the fields from a Header
struct from the parser.
pub fn comment(&mut self, v: &str) -> Result<()>
[src]
Writes a $comment
command.
pub fn date(&mut self, v: &str) -> Result<()>
[src]
Writes a $date
command.
pub fn version(&mut self, v: &str) -> Result<()>
[src]
Writes a $version
command.
pub fn timescale(&mut self, ts: u32, unit: TimescaleUnit) -> Result<()>
[src]
Writes a $timescale
command.
pub fn scope_def(&mut self, t: ScopeType, i: &str) -> Result<()>
[src]
Writes a $scope
command.
pub fn add_module(&mut self, identifier: &str) -> Result<()>
[src]
Writes a $scope
command for a module.
Convenience wrapper around scope_def
.
pub fn upscope(&mut self) -> Result<()>
[src]
Writes an $upscope
command.
pub fn scope(&mut self, s: &Scope) -> Result<()>
[src]
Writes a $scope
command, a series of $var
commands, and an $upscope
commands from
a Scope
structure from the parser.
pub fn var_def(
&mut self,
var_type: VarType,
width: u32,
id: IdCode,
reference: &str,
index: Option<ReferenceIndex>
) -> Result<()>
[src]
&mut self,
var_type: VarType,
width: u32,
id: IdCode,
reference: &str,
index: Option<ReferenceIndex>
) -> Result<()>
Writes a $var
command with a specified id.
pub fn add_var(
&mut self,
var_type: VarType,
width: u32,
reference: &str,
index: Option<ReferenceIndex>
) -> Result<IdCode>
[src]
&mut self,
var_type: VarType,
width: u32,
reference: &str,
index: Option<ReferenceIndex>
) -> Result<IdCode>
Writes a $var
command with the next available ID, returning the assigned ID.
Convenience wrapper around var_def
.
pub fn add_wire(&mut self, width: u32, reference: &str) -> Result<IdCode>
[src]
Adds a $var
for a wire with the next available ID, returning the assigned ID.
Convenience wrapper around add_var
.
pub fn var(&mut self, v: &Var) -> Result<()>
[src]
Writes a $var
command from a Var
structure from the parser.
pub fn enddefinitions(&mut self) -> Result<()>
[src]
Writes a $enddefinitions
command to end the header.
pub fn timestamp(&mut self, ts: u64) -> Result<()>
[src]
Writes a #xxx
timestamp.
pub fn change_scalar<V: Into<Value>>(&mut self, id: IdCode, v: V) -> Result<()>
[src]
Writes a change to a scalar variable.
pub fn change_vector(&mut self, id: IdCode, v: &[Value]) -> Result<()>
[src]
Writes a change to a vector variable.
pub fn change_real(&mut self, id: IdCode, v: f64) -> Result<()>
[src]
Writes a change to a real variable.
pub fn change_string(&mut self, id: IdCode, v: &str) -> Result<()>
[src]
Writes a change to a string variable.
pub fn begin(&mut self, c: SimulationCommand) -> Result<()>
[src]
Writes the beginning of a simulation command.
pub fn end(&mut self) -> Result<()>
[src]
Writes an $end
to end a simulation command.
pub fn command(&mut self, c: &Command) -> Result<()>
[src]
Writes a command from a Command
enum as parsed by the parser.
Auto Trait Implementations
impl<'w> !RefUnwindSafe for Writer<'w>
impl<'w> !Send for Writer<'w>
impl<'w> !Sync for Writer<'w>
impl<'w> Unpin for Writer<'w>
impl<'w> !UnwindSafe for Writer<'w>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,