Struct dsdl_parser::FileName
[−]
[src]
pub struct FileName { pub id: Option<String>, pub namespace: String, pub name: String, pub version: Option<Version>, }
Uniquely defines a DSDL file
Fields
id: Option<String>
namespace: String
name: String
version: Option<Version>
Methods
impl FileName
[src]
fn split_namespace(&self) -> Vec<String>
[src]
Split a namespace into parts
Examples
use dsdl_parser::FileName; let name = FileName { id: Some(String::from("341")), namespace: String::from("uavcan.protocol"), name: String::from("NodeStatus"), version: None, }; assert_eq!(name.split_namespace(), vec!["uavcan", "protocol"]);
fn rsplit_namespace(&self) -> Vec<String>
[src]
Split a namespace into parts
Examples
use dsdl_parser::FileName; let name = FileName { id: Some(String::from("341")), namespace: String::from("uavcan.protocol"), name: String::from("NodeStatus"), version: None, }; assert_eq!(name.rsplit_namespace(), vec!["protocol", "uavcan"]);
Trait Implementations
impl Display for FileName
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Clone for FileName
[src]
fn clone(&self) -> FileName
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for FileName
[src]
impl PartialEq for FileName
[src]
fn eq(&self, __arg_0: &FileName) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &FileName) -> bool
[src]
This method tests for !=
.