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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more