struct OffsetHelper<T, S>(T, S);
Expand description
Calling get_trailer_offset
directly in vtable doesn’t work because it
prevents the vtable from being promoted to a static reference.
See this thread for more info: https://users.rust-lang.org/t/custom-vtables-with-integers/78508
Tuple Fields§
§0: T
§1: S
Implementations§
source§impl<T: Future, S: Schedule> OffsetHelper<T, S>
impl<T: Future, S: Schedule> OffsetHelper<T, S>
const TRAILER_OFFSET: usize = _
const SCHEDULER_OFFSET: usize = _
const ID_OFFSET: usize = _
Auto Trait Implementations§
impl<T, S> Freeze for OffsetHelper<T, S>
impl<T, S> RefUnwindSafe for OffsetHelper<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for OffsetHelper<T, S>
impl<T, S> Sync for OffsetHelper<T, S>
impl<T, S> Unpin for OffsetHelper<T, S>
impl<T, S> UnwindSafe for OffsetHelper<T, S>where
T: UnwindSafe,
S: UnwindSafe,
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