pub struct PyVtkWriter {
pub filename: String,
pub point_data: Vec<(String, Vec<f64>)>,
pub cell_data: Vec<(String, Vec<f64>)>,
}Expand description
In-memory VTK legacy-format writer (ASCII and binary stubs).
Fields§
§filename: StringOutput filename.
point_data: Vec<(String, Vec<f64>)>Named point data arrays.
cell_data: Vec<(String, Vec<f64>)>Named cell data arrays.
Implementations§
Source§impl PyVtkWriter
impl PyVtkWriter
Sourcepub fn new(filename: impl Into<String>) -> Self
pub fn new(filename: impl Into<String>) -> Self
Create a new VTK writer targeting the given file.
Sourcepub fn add_point_data(&mut self, name: impl Into<String>, data: Vec<f64>)
pub fn add_point_data(&mut self, name: impl Into<String>, data: Vec<f64>)
Attach a named point-data array.
Sourcepub fn add_cell_data(&mut self, name: impl Into<String>, data: Vec<f64>)
pub fn add_cell_data(&mut self, name: impl Into<String>, data: Vec<f64>)
Attach a named cell-data array.
Sourcepub fn write_ascii(&self) -> String
pub fn write_ascii(&self) -> String
Serialise to a minimal VTK ASCII string (stub — does not write disk I/O).
Sourcepub fn write_binary(&self) -> usize
pub fn write_binary(&self) -> usize
Stub that returns the byte length that a binary VTK file would have.
Sourcepub fn n_point_arrays(&self) -> usize
pub fn n_point_arrays(&self) -> usize
Number of point-data arrays attached.
Sourcepub fn n_cell_arrays(&self) -> usize
pub fn n_cell_arrays(&self) -> usize
Number of cell-data arrays attached.
Trait Implementations§
Source§impl Clone for PyVtkWriter
impl Clone for PyVtkWriter
Source§fn clone(&self) -> PyVtkWriter
fn clone(&self) -> PyVtkWriter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyVtkWriter
impl Debug for PyVtkWriter
Source§impl Default for PyVtkWriter
impl Default for PyVtkWriter
Source§impl<'de> Deserialize<'de> for PyVtkWriter
impl<'de> Deserialize<'de> for PyVtkWriter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PyVtkWriter
impl RefUnwindSafe for PyVtkWriter
impl Send for PyVtkWriter
impl Sync for PyVtkWriter
impl Unpin for PyVtkWriter
impl UnsafeUnpin for PyVtkWriter
impl UnwindSafe for PyVtkWriter
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.