pub struct Images<'w> { /* private fields */ }Expand description
A read-only view over the images (frames) held by a MagickWand.
Obtained from MagickWand::images. Creating the view resets the wand’s
iterator, and each frame handed out by Images::get, Images::first,
Images::last, or the iteration helpers re-pins the iterator to the
correct frame before delegating, so frame access stays consistent regardless
of call order.
Implementations§
Source§impl<'w> Images<'w>
impl<'w> Images<'w>
Sourcepub fn get(&self, index: usize) -> Option<ImageRef<'_>>
pub fn get(&self, index: usize) -> Option<ImageRef<'_>>
Borrow the frame at index, or None if out of bounds.
Sourcepub fn first(&self) -> Option<ImageRef<'_>>
pub fn first(&self) -> Option<ImageRef<'_>>
Borrow the first frame, or None if the list is empty.
Sourcepub fn last(&self) -> Option<ImageRef<'_>>
pub fn last(&self) -> Option<ImageRef<'_>>
Borrow the last frame, or None if the list is empty.
Sourcepub fn for_each(&self, f: impl FnMut(usize, ImageRef<'_>))
pub fn for_each(&self, f: impl FnMut(usize, ImageRef<'_>))
Visit every frame in order, passing its index and a borrow to f.
Sourcepub fn try_for_each(
&self,
f: impl FnMut(usize, ImageRef<'_>) -> Result<(), MagickError>,
) -> Result<(), MagickError>
pub fn try_for_each( &self, f: impl FnMut(usize, ImageRef<'_>) -> Result<(), MagickError>, ) -> Result<(), MagickError>
Like Images::for_each, but f may fail; the first error stops
iteration and is returned.
Auto Trait Implementations§
impl<'w> Freeze for Images<'w>
impl<'w> RefUnwindSafe for Images<'w>
impl<'w> !Send for Images<'w>
impl<'w> !Sync for Images<'w>
impl<'w> Unpin for Images<'w>
impl<'w> UnsafeUnpin for Images<'w>
impl<'w> UnwindSafe for Images<'w>
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