[−][src]Struct oxygengine::prelude::Grid2d
Implementations
impl<T> Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
pub fn new(cols: usize, rows: usize, fill: T) -> Grid2d<T>
[src]
pub fn with_cells(cols: usize, cells: Vec<T>) -> Grid2d<T>
[src]
pub fn resize(&mut self, cols: usize, rows: usize, default: T)
[src]
pub fn cols(&self) -> usize
[src]
pub fn rows(&self) -> usize
[src]
pub fn size(&self) -> (usize, usize)
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn cells(&self) -> &[T]
[src]
pub fn cells_mut(&mut self) -> &mut [T]
[src]
pub fn cell(&self, col: usize, row: usize) -> Option<&T>
[src]
pub fn cell_mut(&mut self, col: usize, row: usize) -> Option<&mut T>
[src]
pub fn get(&self, col: usize, row: usize) -> Option<T>
[src]
pub fn set(&mut self, col: usize, row: usize, value: T)
[src]
pub fn get_col_cells(&self, index: usize) -> Option<Vec<T>>
[src]
pub fn get_row_cells(&self, index: usize) -> Option<Vec<T>>
[src]
pub fn copy_part(&self, range: Range<(usize, usize)>, result: &mut Grid2d<T>) where
T: Default,
[src]
T: Default,
pub fn get_part(&self, range: Range<(usize, usize)>) -> Grid2d<T>
[src]
pub fn get_part_seamless(&self, range: Range<(usize, usize)>) -> Grid2d<T>
[src]
pub fn get_view(&self, range: Range<(usize, usize)>) -> Grid2d<&T>
[src]
pub fn get_view_seamless(&self, range: Range<(usize, usize)>) -> Grid2d<&T>
[src]
pub fn copy_sample(&self, (usize, usize), margin: usize, result: &mut Grid2d<T>) where
T: Default,
[src]
T: Default,
pub fn sample(&self, (usize, usize), margin: usize) -> Grid2d<T>
[src]
pub fn sample_seamless(&self, (usize, usize), margin: usize) -> Grid2d<T>
[src]
pub fn view_sample(&self, (usize, usize), margin: usize) -> Grid2d<&T>
[src]
pub fn view_sample_seamless(&self, (usize, usize), margin: usize) -> Grid2d<&T>
[src]
pub fn map<F, R>(&self, f: F) -> Grid2d<R> where
F: FnMut(usize, usize, &T) -> R,
R: Clone + Send + Sync,
[src]
F: FnMut(usize, usize, &T) -> R,
R: Clone + Send + Sync,
pub fn with<F>(&mut self, f: F) where
F: FnMut(usize, usize, &T) -> T,
[src]
F: FnMut(usize, usize, &T) -> T,
pub fn iter(&self) -> impl DoubleEndedIterator
[src]
pub fn iter_mut(&mut self) -> impl DoubleEndedIterator
[src]
pub fn iter_view(
&self,
range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
[src]
&self,
range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
pub fn iter_view_mut(
&mut self,
range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
[src]
&mut self,
range: Range<(usize, usize)>
) -> impl DoubleEndedIterator
pub fn iter_sample(
&'a self,
range: Range<(usize, usize)>,
margin: usize
) -> impl DoubleEndedIterator + 'a
[src]
&'a self,
range: Range<(usize, usize)>,
margin: usize
) -> impl DoubleEndedIterator + 'a
pub fn neighbor_sample(&self, (usize, usize)) -> Grid2dNeighborSample<T> where
T: Default + Copy,
[src]
T: Default + Copy,
pub fn windows(&self, (usize, usize)) -> impl DoubleEndedIterator
[src]
pub fn windows_seamless(&self, (usize, usize)) -> impl DoubleEndedIterator
[src]
pub fn into_inner(self) -> (usize, usize, Vec<T>)
[src]
pub fn from_view(view: &Grid2d<&T>) -> Grid2d<T>
[src]
pub fn get_common_areas(
first_size: (usize, usize),
second_size: (usize, usize),
second_offset: (usize, usize)
) -> Option<(Range<(usize, usize)>, Range<(usize, usize)>)>
[src]
first_size: (usize, usize),
second_size: (usize, usize),
second_offset: (usize, usize)
) -> Option<(Range<(usize, usize)>, Range<(usize, usize)>)>
pub fn access_decoupled(
&'a self,
read: &[(usize, usize)],
write: &[(usize, usize)],
reads: &mut [&'a T],
writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
[src]
&'a self,
read: &[(usize, usize)],
write: &[(usize, usize)],
reads: &mut [&'a T],
writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
pub unsafe fn access_decoupled_unsafe(
&'a self,
read: &[(usize, usize)],
write: &[(usize, usize)],
reads: &mut [&'a T],
writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
[src]
&'a self,
read: &[(usize, usize)],
write: &[(usize, usize)],
reads: &mut [&'a T],
writes: &mut [&'a mut T]
) -> Result<(), Grid2dError>
impl<T> Grid2d<T> where
T: Clone + Send + Sync + PartialEq<T>,
[src]
T: Clone + Send + Sync + PartialEq<T>,
Trait Implementations
impl<'_, T> Add<&'_ Grid2d<T>> for &'_ Grid2d<T> where
T: Clone + Send + Sync + Add<T, Output = T>,
[src]
T: Clone + Send + Sync + Add<T, Output = T>,
type Output = Result<Grid2d<T>, Grid2dError>
The resulting type after applying the +
operator.
fn add(self, other: &Grid2d<T>) -> <&'_ Grid2d<T> as Add<&'_ Grid2d<T>>>::Output
[src]
impl<T> Clone for Grid2d<T> where
T: Clone,
[src]
T: Clone,
impl<T> Debug for Grid2d<T> where
T: Debug,
[src]
T: Debug,
impl<T> Default for Grid2d<T> where
T: Default,
[src]
T: Default,
impl<'de, T> Deserialize<'de> for Grid2d<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Grid2d<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Grid2d<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<'_, T> Div<&'_ Grid2d<T>> for &'_ Grid2d<T> where
T: Clone + Send + Sync + Div<T, Output = T>,
[src]
T: Clone + Send + Sync + Div<T, Output = T>,
type Output = Result<Grid2d<T>, Grid2dError>
The resulting type after applying the /
operator.
fn div(self, other: &Grid2d<T>) -> <&'_ Grid2d<T> as Div<&'_ Grid2d<T>>>::Output
[src]
impl<I, T> From<(usize, I)> for Grid2d<T> where
I: Iterator<Item = T>,
T: Clone + Send + Sync,
[src]
I: Iterator<Item = T>,
T: Clone + Send + Sync,
impl<T> Index<[usize; 2]> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> Index<(usize, usize)> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> IndexMut<[usize; 2]> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> IndexMut<(usize, usize)> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> Into<(usize, usize, Vec<T>)> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> Into<Vec<T>> for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
impl<T> IntoIterator for Grid2d<T> where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <Grid2d<T> as IntoIterator>::IntoIter
[src]
impl<'_, T> Mul<&'_ Grid2d<T>> for &'_ Grid2d<T> where
T: Clone + Send + Sync + Mul<T, Output = T>,
[src]
T: Clone + Send + Sync + Mul<T, Output = T>,
type Output = Result<Grid2d<T>, Grid2dError>
The resulting type after applying the *
operator.
fn mul(self, other: &Grid2d<T>) -> <&'_ Grid2d<T> as Mul<&'_ Grid2d<T>>>::Output
[src]
impl<'_, T> Neg for &'_ Grid2d<T> where
T: Clone + Send + Sync + Neg<Output = T>,
[src]
T: Clone + Send + Sync + Neg<Output = T>,
type Output = Grid2d<T>
The resulting type after applying the -
operator.
fn neg(self) -> <&'_ Grid2d<T> as Neg>::Output
[src]
impl<T> PartialEq<Grid2d<T>> for Grid2d<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
impl<T> Serialize for Grid2d<T> where
T: Serialize,
[src]
T: Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<'_, T> Sub<&'_ Grid2d<T>> for &'_ Grid2d<T> where
T: Clone + Send + Sync + Sub<T, Output = T>,
[src]
T: Clone + Send + Sync + Sub<T, Output = T>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Grid2d<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Grid2d<T> where
T: Send,
T: Send,
impl<T> Sync for Grid2d<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Grid2d<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Grid2d<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> Resource for T where
T: Any,
T: Any,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,