Enum vtkio::model::Piece [−][src]
A piece of a data set.
This can be stored as a reference to another VTK file, as pointer to memory with the corresponding piece data set, or as inline piece data as described in serial XML formats or legacy formats.
Variants
A reference to a piece as a file path.
This variant is used with “Parallel” XML formats, which distribute their data among a collection of other files storing pieces of the data.
Data set corresponding to piece data loaded from a file.
This variant is when data referenced in “Parallel” XML formats, gets loaded.
Inline(Box<P>)
Piece data stored inline with the rest of the host file.
This corresponds to Piece
elements stored in serial XML formats.
Implementations
impl<P: PieceData> Piece<P>
[src]
pub fn load_piece_in_place_recursive(
&mut self,
source_path: Option<&Path>
) -> Result<(), Error>
[src]
&mut self,
source_path: Option<&Path>
) -> Result<(), Error>
Converts self
into a loaded piece if the current piece is only a Source
.
This function recursively loads any referenced pieces down the hierarchy.
If this pieces is Loaded
or Inline
, this function does nothing.
The given source_path
is the path to the file containing this piece (if any).
pub fn load_piece_data(&self, source_path: Option<&Path>) -> Result<P, Error> where
P: Clone,
[src]
P: Clone,
Borrows self
and returns a loaded (or cloned) piece data.
If the piece is not yet loaded, this function will load it and return the resulting data, otherwise the data is cloned.
pub fn into_loaded_piece_data(
self,
source_path: Option<&Path>
) -> Result<P, Error>
[src]
self,
source_path: Option<&Path>
) -> Result<P, Error>
Consumes self
and returns loaded piece data.
If the piece is not yet loaded, this function will load it and return the resulting data.
Trait Implementations
impl<P: Clone> Clone for Piece<P>
[src]
impl<P: Debug> Debug for Piece<P>
[src]
impl<P: PartialEq> PartialEq<Piece<P>> for Piece<P>
[src]
impl<P> StructuralPartialEq for Piece<P>
[src]
Auto Trait Implementations
impl<P> RefUnwindSafe for Piece<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<P> Send for Piece<P> where
P: Send,
P: Send,
impl<P> Sync for Piece<P> where
P: Sync,
P: Sync,
impl<P> Unpin for Piece<P>
impl<P> UnwindSafe for Piece<P> where
P: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,