Skip to main content

ShmHeader

Struct ShmHeader 

Source
pub struct ShmHeader {
Show 16 fields pub magic: u32, pub version: u32, pub flags: u32, pub ready: AtomicU32, pub heartbeat: AtomicU32, pub error_code: u32, pub shutdown_request: AtomicU32, pub tasks_issued: AtomicU32, pub tasks_completed: AtomicU32, pub block_size: AtomicU32, pub num_input_channels: AtomicU32, pub num_output_channels: AtomicU32, pub request_type: AtomicU32, pub request_status: AtomicU32, pub scratch_size: AtomicU32, pub parent_window: AtomicU64, /* private fields */
}
Expand description

Shared-memory header (256 bytes).

Fields§

§magic: u32§version: u32§flags: u32§ready: AtomicU32§heartbeat: AtomicU32§error_code: u32§shutdown_request: AtomicU32§tasks_issued: AtomicU32§tasks_completed: AtomicU32§block_size: AtomicU32§num_input_channels: AtomicU32§num_output_channels: AtomicU32§request_type: AtomicU32

Request type: 0 = none, 1 = save_state, 2 = restore_state, 3 = gui_show, 4 = gui_hide

§request_status: AtomicU32

Request status: 0 = pending, 1 = success, 2 = error

§scratch_size: AtomicU32

Valid bytes in scratch area for state operations

§parent_window: AtomicU64

Parent window ID for GUI embedding (X11 window ID on Unix, HWND on Windows)

Implementations§

Source§

impl ShmHeader

Source

pub fn parent_window_usize(&self) -> usize

Load parent_window as a usize (handles 32- and 64-bit platforms).

Source

pub fn set_parent_window(&self, window: usize)

Store a usize parent_window (truncates on 32-bit, but HWNDs/XIDs are always within 64 bits).

Trait Implementations§

Source§

impl Default for ShmHeader

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.