Struct nifti::extension::Extension [−][src]
pub struct Extension { /* fields omitted */ }
Data type for the raw contents of an extension. Users of this type have to reinterpret the data to suit their needs.
Methods
impl Extension
[src]
impl Extension
pub fn new(esize: i32, ecode: i32, edata: Vec<u8>) -> Self
[src]
pub fn new(esize: i32, ecode: i32, edata: Vec<u8>) -> Self
Create an extension out of its main components.
Panics
If esize
does not correspond to the full size
of the extension in bytes: 8 + edata.len()
pub fn size(&self) -> i32
[src]
pub fn size(&self) -> i32
Obtain the claimed extension raw size (esize
field).
pub fn code(&self) -> i32
[src]
pub fn code(&self) -> i32
Obtain the extension's code (ecode
field).
pub fn data(&self) -> &Vec<u8>
[src]
pub fn data(&self) -> &Vec<u8>
Obtain the extension's data (edata
field).
pub fn into_data(self) -> Vec<u8>
[src]
pub fn into_data(self) -> Vec<u8>
Take the extension's raw data, discarding the rest.
Trait Implementations
impl Debug for Extension
[src]
impl Debug for Extension
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 Extension
[src]
impl PartialEq for Extension
fn eq(&self, other: &Extension) -> bool
[src]
fn eq(&self, other: &Extension) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Extension) -> bool
[src]
fn ne(&self, other: &Extension) -> bool
This method tests for !=
.
impl Clone for Extension
[src]
impl Clone for Extension