Struct Iter
pub struct Iter<'a, A: 'a> { pub(in ::option) inner: Item<&'a A> }
An iterator over a reference to the Some variant of an Option.
The iterator yields one value if the Option is a Some, otherwise none.
This struct is created by the Option::iter function.
Fields
inner: Item<&'a A>
Trait Implementations
impl<'a, A> DoubleEndedIterator for Iter<'a, A>
fn next_back(&mut self) -> Option<&'a A>
impl<'a, A> Iterator for Iter<'a, A>
type Item = &'a A;fn next(&mut self) -> Option<&'a A>fn size_hint(&self) -> (usize, Option<usize>)
impl<'a, A: Debug + 'a> Debug for Iter<'a, A>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<A> Clone for Iter<'_, A>
fn clone(&self) -> Self
impl<A> ExactSizeIterator for Iter<'_, A>
impl<A> FusedIterator for Iter<'_, A>
impl<A> TrustedLen for Iter<'_, A>
impl<T> OneShot for Iter<'_, T>
Auto Trait Implementations
impl<'a, A> Freeze for Iter<'a, A>
where
Item<&'a A>: Freeze,
impl<'a, A> RefUnwindSafe for Iter<'a, A>
where
Item<&'a A>: RefUnwindSafe,
impl<'a, A> Send for Iter<'a, A>
where
Item<&'a A>: Send,
impl<'a, A> Sync for Iter<'a, A>
where
Item<&'a A>: Sync,
impl<'a, A> Unpin for Iter<'a, A>
where
Item<&'a A>: Unpin,
impl<'a, A> UnsafeUnpin for Iter<'a, A>
where
Item<&'a A>: UnsafeUnpin,
impl<'a, A> UnwindSafe for Iter<'a, A>
where
Item<&'a A>: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for Iter<'a, A>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Iter<'a, A>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Iter<'a, A>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Iter<'a, A>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Iter<'a, A>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Iter<'a, A>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Iter<'a, A>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Iter<'a, A>
impl<T, U> Into<U> for Iter<'a, A>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Iter<'a, A>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Iter<'a, A>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>