Struct dsdl_parser::DSDL
[−]
[src]
pub struct DSDL { /* fields omitted */ }
The DSDL
struct contains a number of data type definition
Methods
impl DSDL
[src]
fn read<P: AsRef<Path>>(path: P) -> Result<DSDL>
[src]
Reads DSDL
definition recursively if path is a directory. Reads one DSDL
definition if path is a definition.
Example
use dsdl_parser::DSDL; assert!(DSDL::read("tests/dsdl/").is_ok());
fn get_file<T: AsRef<str>>(&self, name: T) -> Option<&File>
[src]
Return a file if there exists one, returns None
otherwise
Example
use dsdl_parser::DSDL; let dsdl = DSDL::read("tests/dsdl/").unwrap(); assert!(dsdl.get_file("uavcan.protocol.NodeStatus").is_some());
fn files(&self) -> Vec<&File>
[src]
Returns a vector containing references to all files
Example
use dsdl_parser::DSDL; let dsdl = DSDL::read("tests/dsdl/").unwrap(); assert!(dsdl.files().len() >= 1);
fn data_type_signature<T: AsRef<str>>(&self, name: T) -> Option<u64>
[src]
Returns the data type signature of a data type
Example
use dsdl_parser::DSDL; let dsdl = DSDL::read("tests/dsdl/").unwrap(); assert_eq!(dsdl.data_type_signature("uavcan.protocol.GetNodeInfo").unwrap(), 0xee468a8121c46a9e);
Trait Implementations
impl Debug for DSDL
[src]
impl PartialEq for DSDL
[src]
fn eq(&self, __arg_0: &DSDL) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DSDL) -> bool
[src]
This method tests for !=
.