Struct nsl_duplex_d2::File [−][src]
Structure for files
Fields
name: String
Name of file
body: Vec<u8>
Contents of file
Methods
impl File
[src]
impl File
pub fn new(name: &str, body: &[u8]) -> Self
[src]
pub fn new(name: &str, body: &[u8]) -> Self
Create a new file object by copying name and body.
pub fn parse(input: &[u8]) -> IResult<&[u8], File>
[src]
pub fn parse(input: &[u8]) -> IResult<&[u8], File>
Create a new file object by parsing raw serial data.
pub fn encode(&self) -> Vec<u8>
[src]
pub fn encode(&self) -> Vec<u8>
Encode a file object to raw serial data.
Trait Implementations
impl Debug for File
[src]
impl Debug for File
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for File
[src]
impl PartialEq for File