[−][src]Struct vcd::Header
Structure containing the data from the header of a VCD file.
Fields (Non-exhaustive)
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.comment: Option<String>
date: Option<String>
version: Option<String>
timescale: Option<(u32, TimescaleUnit)>
items: Vec<ScopeItem>
Implementations
impl Header
[src]
pub fn find_scope<S>(&self, path: &[S]) -> Option<&Scope> where
S: Borrow<str>,
[src]
S: Borrow<str>,
Find the scope object at a specified path.
Example
let mut parser = vcd::Parser::new(&b" $scope module a $end $scope module b $end $var integer 16 n0 counter $end $upscope $end $upscope $end $enddefinitions $end "[..]); let header = parser.parse_header().unwrap(); let scope = header.find_scope(&["a", "b"]).unwrap(); assert_eq!(scope.identifier, "b");
pub fn find_var<S>(&self, path: &[S]) -> Option<&Var> where
S: Borrow<str>,
[src]
S: Borrow<str>,
Find the variable object at a specified path.
Example
let mut parser = vcd::Parser::new(&b" $scope module a $end $scope module b $end $var integer 16 n0 counter $end $upscope $end $upscope $end $enddefinitions $end "[..]); let header = parser.parse_header().unwrap(); let var = header.find_var(&["a", "b", "counter"]).unwrap(); assert_eq!(var.reference, "counter");
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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>,