Lines Matching refs:T
17 pub(crate) type Invariant<T> = PhantomData<fn(*mut T) -> *mut T>;
23 pub(crate) struct InitClosure<F, T: ?Sized, E>(pub(crate) F, pub(crate) Invariant<(E, T)>);
27 unsafe impl<T: ?Sized, F, E> Init<T, E> for InitClosure<F, T, E>
29 F: FnOnce(*mut T) -> Result<(), E>,
32 unsafe fn __init(self, slot: *mut T) -> Result<(), E> { in __init()
39 unsafe impl<T: ?Sized, F, E> PinInit<T, E> for InitClosure<F, T, E>
41 F: FnOnce(*mut T) -> Result<(), E>,
44 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init()
109 pub struct AllData<T: ?Sized>(Invariant<T>);
111 impl<T: ?Sized> Clone for AllData<T> {
117 impl<T: ?Sized> Copy for AllData<T> {}
120 unsafe impl<T: ?Sized> InitData for AllData<T> {
121 type Datee = T;
125 unsafe impl<T: ?Sized> HasInitData for T { implementation
126 type InitData = AllData<T>;
140 pub struct StackInit<T> {
141 value: MaybeUninit<T>,
145 impl<T> Drop for StackInit<T> {
156 impl<T> StackInit<T> {
171 pub fn init<E>(self: Pin<&mut Self>, init: impl PinInit<T, E>) -> Result<Pin<&mut T>, E> { in init() argument
221 pub struct DropGuard<T: ?Sized> {
222 ptr: *mut T,
225 impl<T: ?Sized> DropGuard<T> {
237 pub unsafe fn new(ptr: *mut T) -> Self { in new()
242 impl<T: ?Sized> Drop for DropGuard<T> {
271 pub struct AlwaysFail<T: ?Sized> {
272 _t: PhantomData<T>,
275 impl<T: ?Sized> AlwaysFail<T> {
282 impl<T: ?Sized> Default for AlwaysFail<T> {
289 unsafe impl<T: ?Sized> PinInit<T, ()> for AlwaysFail<T> {
290 unsafe fn __pinned_init(self, _slot: *mut T) -> Result<(), ()> { in __pinned_init()