SliceDataBlock

Struct SliceDataBlock 

Source
pub struct SliceDataBlock<T: ReflectedType, C> { /* private fields */ }
Expand description

A generic data block container wrapping any type that can be taken as a slice ref.

Implementations§

Source§

impl<T: ReflectedType, C> SliceDataBlock<T, C>

Source

pub fn get_bounds(&self, data_attrs: &DatasetAttributes) -> BoundingBox

Source§

impl<T: ReflectedType, C> SliceDataBlock<T, C>

Source

pub fn new( size: BlockCoord, grid_position: GridCoord, data: C, ) -> SliceDataBlock<T, C>

Source

pub fn into_data(self) -> C

Trait Implementations§

Source§

impl<T: Clone + ReflectedType, C: Clone> Clone for SliceDataBlock<T, C>

Source§

fn clone(&self) -> SliceDataBlock<T, C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: ReflectedType, C: AsRef<[T]>> DataBlock<T> for SliceDataBlock<T, C>

Source§

impl<T: Debug + ReflectedType, C: Debug> Debug for SliceDataBlock<T, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C: AsMut<[f32]>> ReadableDataBlock for SliceDataBlock<f32, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[f64]>> ReadableDataBlock for SliceDataBlock<f64, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[i16]>> ReadableDataBlock for SliceDataBlock<i16, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[i32]>> ReadableDataBlock for SliceDataBlock<i32, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[i64]>> ReadableDataBlock for SliceDataBlock<i64, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[i8]>> ReadableDataBlock for SliceDataBlock<i8, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[u16]>> ReadableDataBlock for SliceDataBlock<u16, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[u32]>> ReadableDataBlock for SliceDataBlock<u32, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[u64]>> ReadableDataBlock for SliceDataBlock<u64, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsMut<[u8]>> ReadableDataBlock for SliceDataBlock<u8, C>

Source§

fn read_data<R: Read>(&mut self, source: R) -> Result<()>

Read data into this block from a source, overwriting any existing data. Read more
Source§

impl<C: AsRef<[f32]>> WriteableDataBlock for SliceDataBlock<f32, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[f64]>> WriteableDataBlock for SliceDataBlock<f64, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[i16]>> WriteableDataBlock for SliceDataBlock<i16, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[i32]>> WriteableDataBlock for SliceDataBlock<i32, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[i64]>> WriteableDataBlock for SliceDataBlock<i64, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[i8]>> WriteableDataBlock for SliceDataBlock<i8, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[u16]>> WriteableDataBlock for SliceDataBlock<u16, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[u32]>> WriteableDataBlock for SliceDataBlock<u32, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[u64]>> WriteableDataBlock for SliceDataBlock<u64, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.
Source§

impl<C: AsRef<[u8]>> WriteableDataBlock for SliceDataBlock<u8, C>

Source§

fn write_data<W: Write>(&self, target: W) -> Result<()>

Write the data from this block into a target.

Auto Trait Implementations§

§

impl<T, C> Freeze for SliceDataBlock<T, C>
where C: Freeze,

§

impl<T, C> RefUnwindSafe for SliceDataBlock<T, C>

§

impl<T, C> Send for SliceDataBlock<T, C>
where C: Send,

§

impl<T, C> Sync for SliceDataBlock<T, C>
where C: Sync,

§

impl<T, C> Unpin for SliceDataBlock<T, C>
where C: Unpin, T: Unpin,

§

impl<T, C> UnwindSafe for SliceDataBlock<T, C>
where C: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.