Lines Matching refs:T
16 pub(super) type Invariant<T> = PhantomData<fn(*mut T) -> *mut T>;
21 pub(crate) struct InitClosure<F, T: ?Sized, E>(pub(crate) F, pub(crate) Invariant<(E, T)>);
25 unsafe impl<T: ?Sized, F, E> Init<T, E> for InitClosure<F, T, E>
27 F: FnOnce(*mut T) -> Result<(), E>,
30 unsafe fn __init(self, slot: *mut T) -> Result<(), E> { in __init()
37 unsafe impl<T: ?Sized, F, E> PinInit<T, E> for InitClosure<F, T, E>
39 F: FnOnce(*mut T) -> Result<(), E>,
42 unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> { in __pinned_init()
105 pub struct AllData<T: ?Sized>(PhantomData<fn(Box<T>) -> Box<T>>);
107 impl<T: ?Sized> Clone for AllData<T> {
113 impl<T: ?Sized> Copy for AllData<T> {}
115 unsafe impl<T: ?Sized> InitData for AllData<T> {
116 type Datee = T;
119 unsafe impl<T: ?Sized> HasInitData for T { implementation
120 type InitData = AllData<T>;
134 pub struct StackInit<T> {
135 value: MaybeUninit<T>,
139 impl<T> Drop for StackInit<T> {
150 impl<T> StackInit<T> {
165 pub fn init<E>(self: Pin<&mut Self>, init: impl PinInit<T, E>) -> Result<Pin<&mut T>, E> { in init() argument
187 pub struct DropGuard<T: ?Sized> {
188 ptr: *mut T,
191 impl<T: ?Sized> DropGuard<T> {
203 pub unsafe fn new(ptr: *mut T) -> Self { in new()
208 impl<T: ?Sized> Drop for DropGuard<T> {