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 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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.