ThreadUtilsImpl

Struct ThreadUtilsImpl 

Source
pub struct ThreadUtilsImpl {
    pub inner: Pin<Box<dyn Any>>,
    pub create: fn(this: &ThreadUtilsImpl, props: Option<&Dict>, start: Box<dyn FnOnce() -> ThreadReturn + Send + 'static>) -> Option<Thread>,
    pub join: fn(this: &ThreadUtilsImpl, thread: Thread) -> Result<ThreadReturn>,
    pub get_rt_range: fn(this: &ThreadUtilsImpl, props: Option<&Dict>) -> Result<(i32, i32)>,
    pub acquire_rt: fn(this: &ThreadUtilsImpl, thread: &Thread, priority: i32) -> Result<()>,
    pub drop_rt: fn(this: &ThreadUtilsImpl, thread: &Thread) -> Result<()>,
}

Fields§

§inner: Pin<Box<dyn Any>>§create: fn(this: &ThreadUtilsImpl, props: Option<&Dict>, start: Box<dyn FnOnce() -> ThreadReturn + Send + 'static>) -> Option<Thread>§join: fn(this: &ThreadUtilsImpl, thread: Thread) -> Result<ThreadReturn>§get_rt_range: fn(this: &ThreadUtilsImpl, props: Option<&Dict>) -> Result<(i32, i32)>§acquire_rt: fn(this: &ThreadUtilsImpl, thread: &Thread, priority: i32) -> Result<()>§drop_rt: fn(this: &ThreadUtilsImpl, thread: &Thread) -> Result<()>

Implementations§

Source§

impl ThreadUtilsImpl

Source

pub fn create<F>(&self, props: Option<&Dict>, start: F) -> Option<Thread>
where F: FnOnce() -> ThreadReturn + Send + 'static,

Source

pub fn join(&self, thread: Thread) -> Result<ThreadReturn>

Source

pub fn get_rt_range(&self, props: Option<&Dict>) -> Result<(i32, i32)>

Source

pub fn acquire_rt(&self, thread: &Thread, priority: i32) -> Result<()>

Source

pub fn drop_rt(&self, thread: &Thread) -> Result<()>

Trait Implementations§

Source§

impl Interface for ThreadUtilsImpl

Source§

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

Return a C-compatible spa_interface pointer Read more
Source§

unsafe fn free_native(thread: *mut CInterface)

Return a C-compatible spa_interface pointer Read more
Source§

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

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.