pub struct Header {
pub affine4_to_rasmm: Affine4,
pub affine_to_rasmm: Affine,
pub translation: Translation,
pub nb_streamlines: usize,
pub scalars_name: Vec<String>,
pub properties_name: Vec<String>,
/* private fields */
}
Fields§
§affine4_to_rasmm: Affine4
§affine_to_rasmm: Affine
§translation: Translation
§nb_streamlines: usize
§scalars_name: Vec<String>
§properties_name: Vec<String>
Implementations§
Source§impl Header
impl Header
Sourcepub fn from_trk<P: AsRef<Path>>(path: P) -> Result<Header>
pub fn from_trk<P: AsRef<Path>>(path: P) -> Result<Header>
Retrieve a trk header, along with its byte order, from a file in the file system.
Sourcepub fn raw_header(&self) -> CHeader
pub fn raw_header(&self) -> CHeader
Retrieve a copy of the original trk header, as read on disk.
Sourcepub fn read(reader: &mut BufReader<File>) -> Result<(Header, Endianness)>
pub fn read(reader: &mut BufReader<File>) -> Result<(Header, Endianness)>
Retrieve a trk header, along with its byte order, from the given BufReader
. It is assumed
that the reader
is currently at the start of the trk header.
Sourcepub fn clear_scalars_and_properties(&mut self)
pub fn clear_scalars_and_properties(&mut self)
Clear all scalars and properties from self
.
Sourcepub fn clear_scalars(&mut self)
pub fn clear_scalars(&mut self)
Clear all scalars from self
.
Sourcepub fn clear_properties(&mut self)
pub fn clear_properties(&mut self)
Clear all properties from self
.
Sourcepub fn copy_scalars_and_properties(&mut self, rhs: &Self)
pub fn copy_scalars_and_properties(&mut self, rhs: &Self)
Clear all scalars and properties from self
and copy scalars and properties from rhs
.
Sourcepub fn copy_scalars(&mut self, rhs: &Self)
pub fn copy_scalars(&mut self, rhs: &Self)
Clear all scalars from self
and copy scalars from rhs
.
Sourcepub fn copy_properties(&mut self, rhs: &Self)
pub fn copy_properties(&mut self, rhs: &Self)
Clear all properties from self
and copy properties from rhs
.
pub fn add_scalar(&mut self, name: &str) -> Result<()>
pub fn add_property(&mut self, name: &str) -> Result<()>
pub fn write<W: WriteBytesExt>(&self, writer: &mut W) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.