pub struct FromIter<I, T>(/* private fields */);Expand description
Initializes a slice by consuming an iterator.
This initializer is created by the from_iter() factory function.
Trait Implementations§
Source§impl<T, const N: usize, __I> Init<[T; N]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
impl<T, const N: usize, __I> Init<[T; N]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
Source§impl<T, const N: usize, __I> InitPin<[T; N]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
impl<T, const N: usize, __I> InitPin<[T; N]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
Source§fn init_pin<'a, 'b>(
self,
place: Uninit<'a, [T; N]>,
slot: DropSlot<'a, 'b, [T; N]>,
) -> InitPinResult<'a, 'b, [T; N], FromIterError>
fn init_pin<'a, 'b>( self, place: Uninit<'a, [T; N]>, slot: DropSlot<'a, 'b, [T; N]>, ) -> InitPinResult<'a, 'b, [T; N], FromIterError>
Initializes a place with a pinned value. Read more
Source§fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
Chains a closure to execute after successful initialization with a
pinned reference. Read more
Source§fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
Provides a fallback initializer if this one fails. Read more
Source§fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
Provides a fallback initializer based on the error from this one. Read more
Source§fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
Provides a fallback initializer if the primary one fails. The fallback
initializer must be infallible. Read more
Source§fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
Provides a fallback initializer computed from the error of the primary
one. The fallback initializer must be infallible. Read more
Source§impl<T, __I> InitPin<[T]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
impl<T, __I> InitPin<[T]> for FromIter<__I, T>where
__I: IntoIterator<Item = T>,
Source§fn init_pin<'a, 'b>(
self,
place: Uninit<'a, [T]>,
slot: DropSlot<'a, 'b, [T]>,
) -> InitPinResult<'a, 'b, [T], FromIterError>
fn init_pin<'a, 'b>( self, place: Uninit<'a, [T]>, slot: DropSlot<'a, 'b, [T]>, ) -> InitPinResult<'a, 'b, [T], FromIterError>
Initializes a place with a pinned value. Read more
Source§fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
Chains a closure to execute after successful initialization with a
pinned reference. Read more
Source§fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
Provides a fallback initializer if this one fails. Read more
Source§fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
Provides a fallback initializer based on the error from this one. Read more
Source§fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
Provides a fallback initializer if the primary one fails. The fallback
initializer must be infallible. Read more
Source§fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
Provides a fallback initializer computed from the error of the primary
one. The fallback initializer must be infallible. Read more
Source§impl<'t, __I> InitPin<str> for FromIter<__I, &'t str>where
__I: IntoIterator<Item = &'t str>,
impl<'t, __I> InitPin<str> for FromIter<__I, &'t str>where
__I: IntoIterator<Item = &'t str>,
Source§fn init_pin<'a, 'b>(
self,
place: Uninit<'a, str>,
slot: DropSlot<'a, 'b, str>,
) -> InitPinResult<'a, 'b, str, FromIterError>
fn init_pin<'a, 'b>( self, place: Uninit<'a, str>, slot: DropSlot<'a, 'b, str>, ) -> InitPinResult<'a, 'b, str, FromIterError>
Initializes a place with a pinned value. Read more
Source§fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
Chains a closure to execute after successful initialization with a
pinned reference. Read more
Source§fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
Provides a fallback initializer if this one fails. Read more
Source§fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
Provides a fallback initializer based on the error from this one. Read more
Source§fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
Provides a fallback initializer if the primary one fails. The fallback
initializer must be infallible. Read more
Source§fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
Provides a fallback initializer computed from the error of the primary
one. The fallback initializer must be infallible. Read more
Source§impl<__I> InitPin<str> for FromIter<__I, char>where
__I: IntoIterator<Item = char>,
impl<__I> InitPin<str> for FromIter<__I, char>where
__I: IntoIterator<Item = char>,
Source§fn init_pin<'a, 'b>(
self,
place: Uninit<'a, str>,
slot: DropSlot<'a, 'b, str>,
) -> InitPinResult<'a, 'b, str, FromIterError>
fn init_pin<'a, 'b>( self, place: Uninit<'a, str>, slot: DropSlot<'a, 'b, str>, ) -> InitPinResult<'a, 'b, str, FromIterError>
Initializes a place with a pinned value. Read more
Source§fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
fn and_pin<F: FnOnce(Pin<&mut T>)>(self, f: F) -> AndPin<Self, F>
Chains a closure to execute after successful initialization with a
pinned reference. Read more
Source§fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
fn or<M, I2>(self, other: I2) -> Or<Self, I2, M>
Provides a fallback initializer if this one fails. Read more
Source§fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
fn or_else<F, I2>(self, f: F) -> OrElse<Self, F>
Provides a fallback initializer based on the error from this one. Read more
Source§fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
fn unwrap_or<M, I2>(self, other: I2) -> UnwrapOr<Self, I2, M>where
I2: IntoInitPin<T, M, Error = Infallible>,
Provides a fallback initializer if the primary one fails. The fallback
initializer must be infallible. Read more
Source§fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
fn unwrap_or_else<F, I2>(self, f: F) -> UnwrapOrElse<Self, F>
Provides a fallback initializer computed from the error of the primary
one. The fallback initializer must be infallible. Read more
Source§impl<I, T> Initializer for FromIter<I, T>
impl<I, T> Initializer for FromIter<I, T>
Source§impl<I: PartialEq, T: PartialEq> PartialEq for FromIter<I, T>
impl<I: PartialEq, T: PartialEq> PartialEq for FromIter<I, T>
impl<I: PartialEq, T: PartialEq> StructuralPartialEq for FromIter<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for FromIter<I, T>where
I: Freeze,
impl<I, T> RefUnwindSafe for FromIter<I, T>where
I: RefUnwindSafe,
impl<I, T> Send for FromIter<I, T>where
I: Send,
impl<I, T> Sync for FromIter<I, T>where
I: Sync,
impl<I, T> Unpin for FromIter<I, T>where
I: Unpin,
impl<I, T> UnsafeUnpin for FromIter<I, T>where
I: UnsafeUnpin,
impl<I, T> UnwindSafe for FromIter<I, T>where
I: UnwindSafe,
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