Struct Controller

Source
pub struct Controller<ExtIn: Clone, ExtOut: Clone, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> { /* private fields */ }

Implementations§

Source§

impl<ExtIn: 'static + Send + Sync + Clone, ExtOut: 'static + Send + Sync + Clone, SCfg: 'static + Send + Sync, ChannelId: 'static + Debug + Clone + Copy + Hash + PartialEq + Eq + Send + Sync, Event: 'static + Send + Sync + Clone, const INNER_BUS_STACK: usize> Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>

Source

pub fn add_worker<Owner: Debug + Clone + Copy + PartialEq, ICfg: 'static + Send + Sync, Inner: WorkerInner<Owner, ExtIn, ExtOut, ChannelId, Event, ICfg, SCfg>, B: Backend<Owner>>( &mut self, tick: Duration, cfg: ICfg, stack_size: Option<usize>, )

Source

pub fn process(&mut self) -> Option<()>

Source

pub fn spawn(&mut self, cfg: SCfg)

Source

pub fn shutdown(&mut self)

Source

pub fn send_to(&mut self, worker: u16, ext: ExtIn)

Source

pub fn send_to_best(&mut self, ext: ExtIn)

Source

pub fn pop_event(&mut self) -> Option<ExtOut>

Trait Implementations§

Source§

impl<ExtIn: Clone, ExtOut: Clone, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> Default for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> Freeze for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>
where ExtOut: Freeze,

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> !RefUnwindSafe for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> Send for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>
where ExtOut: Send, ChannelId: Send + Sync, SCfg: Send, Event: Send, ExtIn: Send,

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> Sync for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>
where ExtOut: Sync + Send, ChannelId: Send + Sync, SCfg: Send, Event: Send, ExtIn: Send,

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> Unpin for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>
where ExtOut: Unpin,

§

impl<ExtIn, ExtOut, SCfg, ChannelId, Event, const INNER_BUS_STACK: usize> !UnwindSafe for Controller<ExtIn, ExtOut, SCfg, ChannelId, Event, INNER_BUS_STACK>

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.