Skip to main content

ControlFrame

Struct ControlFrame 

pub struct ControlFrame<'a, K> { /* private fields */ }
Expand description

SAFETY: ptr must point to a valid control frame, and the observer must have initialised. Once the observer has initialised, only next and current in the control frame can be updated.

Implementations§

§

impl<'a, K: Default> ControlFrame<'a, K>

pub const NEXT_OFFSET: usize

pub const CURRENT_OFFSET: usize

pub const NUM_CONTROL_FRAMES_OFFSET: usize

pub unsafe fn new(ptr: *mut u8) -> ControlFrame<'a, K>

§Safety

ptr must point to a control frame. Caller must ensure that the lifetime is correct.

pub fn reserved_range(&self) -> Range<u64>

pub fn xsave_layout(&self) -> &Layout

pub fn num_command_frames(&self) -> u32

§

impl ControlFrame<'_, Host>

pub fn current(&self) -> u32

Returns the command frame index that’s currently being processed or waited on by the observer. If the command queue is empty, the observer is waiting for us to fill the command frame pointed to by current. If the command queue is not empty, the observer is currently processing the command frame pointed to by current. current is updated after the command frame itself has been updated. The command frame self.current() - 1 is guaranteed to not be modified as long as next < self.current() - 1.

pub fn update_next(&self, index: u32)

§

impl ControlFrame<'_, Client>

pub fn next(&self) -> u32

pub fn update_current(&self, index: u32)

Trait Implementations§

§

impl<K> Debug for ControlFrame<'_, K>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, K> Freeze for ControlFrame<'a, K>
where K: Freeze,

§

impl<'a, K> RefUnwindSafe for ControlFrame<'a, K>
where K: RefUnwindSafe,

§

impl<'a, K> Send for ControlFrame<'a, K>
where K: Send,

§

impl<'a, K> Sync for ControlFrame<'a, K>
where K: Sync,

§

impl<'a, K> Unpin for ControlFrame<'a, K>
where K: Unpin,

§

impl<'a, K> UnsafeUnpin for ControlFrame<'a, K>
where K: UnsafeUnpin,

§

impl<'a, K> UnwindSafe for ControlFrame<'a, K>
where K: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.