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

Methods

impl FileName
[src]

[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"]);

[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]

[src]

Formats the value using the given formatter. Read more

impl Clone for FileName
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FileName
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for FileName
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for FileName
[src]

impl FromStr for FileName
[src]

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more