Lines Matching defs:Init
264 //! [`impl Init<T, E>`]: crate::Init
493 /// [`PinInit`]/[`Init`] with the error type [`Infallible`]. If you want to use a different error
571 /// [`PinInit`]/[`Init`]. This macro assigns a result to the given variable, adding a `?` after the
629 /// # Init-functions
871 /// use pin_init::{init, Init, init_zeroed};
878 /// fn new() -> impl Init<Self> {
918 /// use pin_init::{try_init, Init, init_zeroed};
926 /// fn new() -> impl Init<Self, AllocError> {
1131 /// The [`Init::__init`] function:
1156 pub unsafe trait Init<T: ?Sized, E = Infallible>: PinInit<T, E> {
1175 /// use pin_init::{init, init_zeroed, Init};
1202 /// An initializer returned by [`Init::chain`].
1208 unsafe impl<T: ?Sized, E, I, F> Init<T, E> for ChainInit<I, F, T, E>
1210 I: Init<T, E>,
1226 I: Init<T, E>,
1254 /// Creates a new [`Init<T, E>`] from the given closure.
1269 ) -> impl Init<T, E> {
1296 pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E> {
1309 pub fn uninit<T, E>() -> impl Init<MaybeUninit<T>, E> {
1326 ) -> impl Init<[T; N], E>
1328 I: Init<T, E>,
1396 unsafe impl<T> Init<T> for T {
1417 unsafe impl<T, E> Init<T, E> for Result<T, E> {
1444 fn write_init<E>(self, init: impl Init<T, E>) -> Result<Self::Initialized, E>;
1505 fn init_zeroed() -> impl Init<Self>
1565 pub fn init_zeroed<T: Zeroable>() -> impl Init<T> {