Lines Matching full:use

10 //! This library's main use-case is in [Rust-for-Linux]. Although this version can be used
59 //! Throughout the examples we will often make use of the `CMutex` type which can be found in
66 //! If you want to use [`PinInit`], then you will have to annotate your `struct` with
75 //! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
76 //! # use core::pin::Pin;
77 //! use pin_init::{pin_data, pin_init, InPlaceInit};
93 //! `foo` now is of the type [`impl PinInit<Foo>`]. We can now use any smart pointer that we like
99 //! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
100 //! # use core::{alloc::AllocError, pin::Pin};
101 //! # use pin_init::*;
121 //! Many types that use this library supply a function/macro that returns an initializer, because
126 //! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
127 //! # use pin_init::*;
128 //! # use std::sync::Arc;
129 //! # use core::pin::Pin;
137 //! # use pin_init::*;
138 //! # #[path = "../examples/error.rs"] mod error; use error::Error;
139 //! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
173 //! use pin_init::{pin_data, pinned_drop, PinInit, PinnedDrop, pin_init_from_closure};
174 //! use core::{
244 //! For more information on how to use [`pin_init_from_closure()`], take a look at the uses inside
283 use core::{
304 pub use alloc::InPlaceInit;
313 /// This macro enables the use of the [`pin_init!`] macro. When pin-initializing a `struct`,
324 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
325 /// use pin_init::pin_data;
341 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
343 /// use core::pin::Pin;
344 /// use pin_init::{pin_data, pinned_drop, PinnedDrop};
365 pub use ::pin_init_internal::pin_data;
375 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
377 /// use core::pin::Pin;
378 /// use pin_init::{pin_data, pinned_drop, PinnedDrop};
399 pub use ::pin_init_internal::pinned_drop;
409 /// use pin_init::Zeroable;
420 /// use pin_init::Zeroable;
428 pub use ::pin_init_internal::Zeroable;
439 /// use pin_init::MaybeZeroable;
459 pub use ::pin_init_internal::MaybeZeroable;
468 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
469 /// # use pin_init::*;
470 /// # use core::pin::Pin;
496 /// [`PinInit`]/[`Init`] with the error type [`Infallible`]. If you want to use a different error
497 /// type, then use [`stack_try_pin_init!`].
520 /// # #[path = "../examples/error.rs"] mod error; use error::Error;
521 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
522 /// # use pin_init::*;
547 /// # #[path = "../examples/error.rs"] mod error; use error::Error;
548 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
549 /// # use pin_init::*;
598 /// # use pin_init::*;
599 /// # use core::pin::Pin;
642 /// # use pin_init::*;
643 /// # use core::pin::Pin;
669 /// # use pin_init::*;
670 /// # use core::pin::Pin;
696 /// # use pin_init::*;
697 /// # use core::pin::Pin;
745 /// - Fields that you want to initialize in-place have to use `<-` instead of `:`.
746 /// - You can use `_: { /* run any user-code here */ },` anywhere where you can place fields in
757 /// # use pin_init::*;
758 /// # use core::{ptr::addr_of_mut, marker::PhantomPinned};
782 pub use pin_init_internal::pin_init;
796 /// pin-initialize, use [`pin_init!`].
802 /// # #[path = "../examples/error.rs"] mod error; use error::Error;
803 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
804 /// # use pin_init::InPlaceInit;
805 /// use pin_init::{init, Init, init_zeroed};
820 pub use pin_init_internal::init;
829 /// use pin_init::{pin_data, assert_pinned};
842 /// use pin_init::{pin_data, assert_pinned};
852 /// Some uses of the macro may trigger the `can't use generic parameters from outer item` error. To
856 /// # use core::pin::Pin;
857 /// use pin_init::{pin_data, assert_pinned};
895 /// To use this initializer, you will need a suitable memory location that can hold a `T`. This can
903 /// cases where a manual implementation is necessary. Use [`pin_init_from_closure`] where possible.
944 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
945 /// # use pin_init::*;
987 /// To use this initializer, you will need a suitable memory location that can hold a `T`. This can
989 /// [`PinInit<T, E>`] is a super trait, you can use every function that takes it as well.
996 /// cases where a manual implementation is necessary. Use [`init_from_closure`] where possible.
1042 /// use pin_init::{init, init_zeroed, Init};
1186 /// # use pin_init::*;
1187 /// use pin_init::init_array_from_fn;
1225 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
1226 /// # use pin_init::*;
1227 /// # use core::pin::Pin;
1228 /// use pin_init::pin_init_array_from_fn;
1229 /// use std::sync::Arc;
1271 /// # use pin_init::*;
1315 /// # use pin_init::*;
1395 /// Use the given initializer to write a value into `self`.
1400 /// Use the given pin-initializer to write a value into `self`.
1435 /// Use [`pinned_drop`] to implement this trait safely:
1439 /// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
1440 /// # use pin_init::*;
1441 /// use core::pin::Pin;
1501 /// use pin_init::{Zeroable, zeroed};
1565 /// use pin_init::{Zeroable, zeroed};
1622 // We cannot use `T: ?Sized`, since the VTABLE pointer part of fat pointers is not allowed to be
1625 // When `Pointee` gets stabilized, we could use
1672 /// # use core::cell::UnsafeCell;
1673 /// # use pin_init::{pin_data, pin_init, Wrapper};