#[repr(C)]
pub struct spa_node_events { pub version: u32, pub info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const spa_node_info)>, pub port_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port: u32, info: *const spa_port_info)>, pub result: Option<unsafe extern "C" fn(data: *mut c_void, seq: c_int, res: c_int, type_: u32, result: *const c_void)>, pub event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event)>, }
Expand description

events from the spa_node.

All event are called from the main thread and multiple listeners can be registered for the events with spa_node_add_listener().

Fields§

§version: u32

< version of this structure

§info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const spa_node_info)>

Emitted when info changes

§port_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port: u32, info: *const spa_port_info)>

Emitted when port info changes, NULL when port is removed

§result: Option<unsafe extern "C" fn(data: *mut c_void, seq: c_int, res: c_int, type_: u32, result: *const c_void)>

notify a result.

Some methods will trigger a result event with an optional result of the given type. Look at the documentation of the method to know when to expect a result event.

The result event can be called synchronously, as an event called from inside the method itself, in which case the seq number passed to the method will be passed unchanged.

The result event will be called asynchronously when the method returned an async return value. In this case, the seq number in the result will match the async return value of the method call. Users should match the seq number from request to the reply.

§event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event)>

\param node a spa_node \param event the event that was emitted

This will be called when an out-of-bound event is notified on \a node.

Trait Implementations§

source§

impl Clone for spa_node_events

source§

fn clone(&self) -> spa_node_events

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for spa_node_events

source§

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

Formats the value using the given formatter. Read more
source§

impl PartialEq for spa_node_events

source§

fn eq(&self, other: &spa_node_events) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for spa_node_events

source§

impl Eq for spa_node_events

source§

impl StructuralPartialEq for spa_node_events

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.