pub struct ImageSlice<'a, P>where
P: 'a,{ /* private fields */ }
Expand description
A shared view of some image data.
Implementations§
Source§impl<'a, P> ImageSlice<'a, P>where
P: 'a,
impl<'a, P> ImageSlice<'a, P>where
P: 'a,
Sourcepub unsafe fn from_raw_parts(
width: usize,
height: usize,
pitch: isize,
ptr: *const P,
) -> ImageSlice<'a, P>
pub unsafe fn from_raw_parts( width: usize, height: usize, pitch: isize, ptr: *const P, ) -> ImageSlice<'a, P>
Makes an image slice from the base parts.
Absolutely no checks are performed, you must not lie to this method.
Trait Implementations§
Source§impl<'a, P> Clone for ImageSlice<'a, P>where
P: Clone + 'a,
impl<'a, P> Clone for ImageSlice<'a, P>where
P: Clone + 'a,
Source§fn clone(&self) -> ImageSlice<'a, P>
fn clone(&self) -> ImageSlice<'a, P>
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<'a, P> Debug for ImageSlice<'a, P>where
P: Debug + 'a,
impl<'a, P> Debug for ImageSlice<'a, P>where
P: Debug + 'a,
Source§impl<'a, P> Hash for ImageSlice<'a, P>where
P: Hash + 'a,
impl<'a, P> Hash for ImageSlice<'a, P>where
P: Hash + 'a,
Source§impl<'a, P> IntoIterator for ImageSlice<'a, P>where
P: 'a,
impl<'a, P> IntoIterator for ImageSlice<'a, P>where
P: 'a,
Source§impl<'a, P> Ord for ImageSlice<'a, P>where
P: Ord + 'a,
impl<'a, P> Ord for ImageSlice<'a, P>where
P: Ord + 'a,
Source§fn cmp(&self, other: &ImageSlice<'a, P>) -> Ordering
fn cmp(&self, other: &ImageSlice<'a, P>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, P> PartialEq for ImageSlice<'a, P>where
P: PartialEq + 'a,
impl<'a, P> PartialEq for ImageSlice<'a, P>where
P: PartialEq + 'a,
Source§impl<'a, P> PartialOrd for ImageSlice<'a, P>where
P: PartialOrd + 'a,
impl<'a, P> PartialOrd for ImageSlice<'a, P>where
P: PartialOrd + 'a,
Source§impl<'a, P> ReadableImage<P> for ImageSlice<'a, P>where
P: 'a,
impl<'a, P> ReadableImage<P> for ImageSlice<'a, P>where
P: 'a,
Source§fn get(&self, loc: (usize, usize)) -> Option<&P>
fn get(&self, loc: (usize, usize)) -> Option<&P>
Performs an optional indexing by reference, gives
None
for out of bounds.Source§fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<'_, P>
fn slice(&self, r: Range<(usize, usize)>) -> ImageSlice<'_, P>
Grabs out a sub-slice of the data. Read more
Source§fn iter(&self) -> ImageRefIter<'_, P> ⓘ
fn iter(&self) -> ImageRefIter<'_, P> ⓘ
Lets you iterate any image by reference.
Source§fn to_vecimage(&self) -> VecImage<P>
fn to_vecimage(&self) -> VecImage<P>
This is like
to_owned
, you get your own version of the data. Read moreimpl<'a, P> Eq for ImageSlice<'a, P>where
P: Eq + 'a,
impl<'a, P> StructuralPartialEq for ImageSlice<'a, P>where
P: 'a,
Auto Trait Implementations§
impl<'a, P> Freeze for ImageSlice<'a, P>
impl<'a, P> RefUnwindSafe for ImageSlice<'a, P>where
P: RefUnwindSafe,
impl<'a, P> !Send for ImageSlice<'a, P>
impl<'a, P> !Sync for ImageSlice<'a, P>
impl<'a, P> Unpin for ImageSlice<'a, P>
impl<'a, P> UnwindSafe for ImageSlice<'a, P>where
P: RefUnwindSafe,
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.