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: Atomic<u32>, pub heartbeat: Atomic<u32>, pub error_code: u32, pub shutdown_request: Atomic<u32>, pub tasks_issued: Atomic<u32>, pub tasks_completed: Atomic<u32>, pub block_size: Atomic<u32>, pub num_input_channels: Atomic<u32>, pub num_output_channels: Atomic<u32>, pub request_type: Atomic<u32>, pub request_status: Atomic<u32>, pub scratch_size: Atomic<u32>, pub parent_window: Atomic<u64>, /* private fields */
}
Expand description

Shared-memory header (256 bytes).

Fields§

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

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

§request_status: Atomic<u32>

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

§scratch_size: Atomic<u32>

Valid bytes in scratch area for state operations

§parent_window: Atomic<u64>

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() -> ShmHeader

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more