pub struct VtableRef<V: 'static>(/* private fields */);
Implementations§
Source§impl<V: 'static> VtableRef<V>
impl<V: 'static> VtableRef<V>
Sourcepub const unsafe fn new(vtable: &'static V) -> Self
pub const unsafe fn new(vtable: &'static V) -> Self
Safety: constructed vtable should only be used by reference, inside of WithVtables wrapper
pub fn table(&self) -> &'static V
pub fn into_raw(v: &Self) -> *const VtableRef<V>
pub fn into_raw_mut(v: Pin<&mut Self>) -> *mut VtableRef<V>
Sourcepub unsafe fn from_raw<'r>(raw: *const VtableRef<V>) -> &'r Self
pub unsafe fn from_raw<'r>(raw: *const VtableRef<V>) -> &'r Self
Safety: lifetime should be correctly specified
Sourcepub unsafe fn from_raw_mut<'r>(raw: *mut VtableRef<V>) -> Pin<&'r mut Self>
pub unsafe fn from_raw_mut<'r>(raw: *mut VtableRef<V>) -> Pin<&'r mut Self>
Safety: lifetime should be correctly specified
Auto Trait Implementations§
impl<V> Freeze for VtableRef<V>
impl<V> RefUnwindSafe for VtableRef<V>where
V: RefUnwindSafe,
impl<V> Send for VtableRef<V>where
V: Sync,
impl<V> Sync for VtableRef<V>where
V: Sync,
impl<V> !Unpin for VtableRef<V>
impl<V> UnwindSafe for VtableRef<V>where
V: RefUnwindSafe,
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