LoopImpl

Struct LoopImpl 

Source
pub struct LoopImpl {
    pub inner: Pin<Box<dyn Any>>,
    pub add_source: fn(_: &mut LoopImpl, source: &Source, func: Box<SourceFn>) -> Result<i32>,
    pub update_source: fn(_: &mut LoopImpl, source: &Source) -> Result<i32>,
    pub remove_source: fn(_: &mut LoopImpl, fd: RawFd) -> Result<i32>,
    pub invoke: fn(this: &LoopImpl, seq: u32, data: &[u8], block: bool, func: Box<InvokeFn>) -> Result<i32>,
}

Fields§

§inner: Pin<Box<dyn Any>>§add_source: fn(_: &mut LoopImpl, source: &Source, func: Box<SourceFn>) -> Result<i32>§update_source: fn(_: &mut LoopImpl, source: &Source) -> Result<i32>§remove_source: fn(_: &mut LoopImpl, fd: RawFd) -> Result<i32>§invoke: fn(this: &LoopImpl, seq: u32, data: &[u8], block: bool, func: Box<InvokeFn>) -> Result<i32>

Implementations§

Source§

impl LoopImpl

Source

pub fn add_source( &mut self, source: &Source, func: Box<SourceFn>, ) -> Result<i32>

Source

pub fn update_source(&mut self, source: &Source) -> Result<i32>

Source

pub fn remove_source(&mut self, fd: RawFd) -> Result<i32>

Source

pub fn invoke( &self, seq: u32, data: &[u8], block: bool, func: Box<InvokeFn>, ) -> Result<i32>

Trait Implementations§

Source§

impl Interface for LoopImpl

Source§

unsafe fn make_native(&self) -> *mut CInterface

Return a C-compatible spa_interface pointer Read more
Source§

unsafe fn free_native(loop_: *mut CInterface)

Return a C-compatible spa_interface pointer Read more
Source§

fn type_id(&self) -> TypeId
where Self: 'static,

Source§

impl Send for LoopImpl

Source§

impl Sync for LoopImpl

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.