Struct vtkio::xml::DataArray[][src]

pub struct DataArray {
    pub scalar_type: ScalarType,
    pub name: String,
    pub format: DataArrayFormat,
    pub offset: Option<u32>,
    pub num_comp: u32,
    pub range_min: Option<f64>,
    pub range_max: Option<f64>,
    pub data: Vec<Data>,
}

Fields

scalar_type: ScalarTypename: Stringformat: DataArrayFormatoffset: Option<u32>num_comp: u32range_min: Option<f64>range_max: Option<f64>data: Vec<Data>

Implementations

impl DataArray[src]

pub fn from_model_data_array(data: DataArray, ei: EncodingInfo) -> Self[src]

Construct a binary DataArray from a given model::DataArray.

pub fn from_field_array(field: FieldArray, ei: EncodingInfo) -> Self[src]

Construct a binary DataArray from a given model::FieldArray.

pub fn from_io_buffer(buf: IOBuffer, ei: EncodingInfo) -> Self[src]

Construct a binary DataArray from a given model::IOBuffer.

pub fn with_name(self, name: impl Into<String>) -> Self[src]

Returns the given DataArray with name set to name.

pub fn with_num_comp(self, num_comp: u32) -> Self[src]

Returns the given DataArray with the given number of components num_comp.

pub fn into_field_array(
    self,
    l: usize,
    appended: Option<&AppendedData>,
    ei: EncodingInfo
) -> Result<FieldArray, ValidationError>
[src]

Convert this data array into a model::FieldArray type.

The given arguments are the number of elements (not bytes) in the expected output buffer and an optional appended data reference.

pub fn into_model_data_array(
    self,
    l: usize,
    appended: Option<&AppendedData>,
    info: &AttributeInfo,
    ei: EncodingInfo
) -> Result<DataArray, ValidationError>
[src]

Convert this data array into a model::DataArray type.

The given arguments are the number of elements (not bytes) in the expected output buffer and an optional appended data reference.

pub fn into_io_buffer(
    self,
    num_elements: usize,
    appended: Option<&AppendedData>,
    ei: EncodingInfo
) -> Result<IOBuffer, ValidationError>
[src]

Convert this data array into an IOBuffer.

This is the same as into_field_array but only keeps the IOBuffer part.

pub fn into_attribute(
    self,
    num_elements: usize,
    appended: Option<&AppendedData>,
    info: &AttributeInfo,
    ei: EncodingInfo
) -> Result<Attribute, ValidationError>
[src]

Trait Implementations

impl Clone for DataArray[src]

impl Debug for DataArray[src]

impl Default for DataArray[src]

impl<'de> Deserialize<'de> for DataArray[src]

impl PartialEq<DataArray> for DataArray[src]

impl Serialize for DataArray[src]

impl StructuralPartialEq for DataArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.