Struct Empty
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct Empty<T>(pub(in ::iter::sources::empty) PhantomData<fn() -> T>);
An iterator that yields nothing.
This struct is created by the [empty()] function. See its documentation for more.
Fields
0: PhantomData<fn() -> T>
Trait Implementations
impl<T> Clone for Empty<T>
fn clone(&self) -> Empty<T>
impl<T> Debug for Empty<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T> Default for Empty<T>
fn default() -> Empty<T>
impl<T> DoubleEndedIterator for Empty<T>
fn next_back(&mut self) -> Option<T>
impl<T> ExactSizeIterator for Empty<T>
fn len(&self) -> usize
impl<T> FusedIterator for Empty<T>
impl<T> Iterator for Empty<T>
type Item = T;fn next(&mut self) -> Option<T>fn size_hint(&self) -> (usize, Option<usize>)
impl<T> OneShot for Empty<T>
impl<T> TrustedLen for Empty<T>
Auto Trait Implementations
impl<T> Freeze for Empty<T>
where
PhantomData<fn() -> T>: Freeze,
impl<T> RefUnwindSafe for Empty<T>
where
PhantomData<fn() -> T>: RefUnwindSafe,
impl<T> Send for Empty<T>
where
PhantomData<fn() -> T>: Send,
impl<T> Sync for Empty<T>
where
PhantomData<fn() -> T>: Sync,
impl<T> Unpin for Empty<T>
where
PhantomData<fn() -> T>: Unpin,
impl<T> UnsafeUnpin for Empty<T>
where
PhantomData<fn() -> T>: UnsafeUnpin,
impl<T> UnwindSafe for Empty<T>
where
PhantomData<fn() -> T>: UnwindSafe,
Blanket Implementations
impl<I> IntoIterator for Empty<T>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Empty<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Empty<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Empty<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Empty<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Empty<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Empty<T>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Empty<T>
impl<T, U> Into<U> for Empty<T>
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 Empty<T>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Empty<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>