Skip to main content

TriggerDeclarer

Struct TriggerDeclarer 

Source
pub struct TriggerDeclarer<'a> { /* private fields */ }
Expand description

Records trigger intentions. Consumed by the executor at add-time.

Implementations§

Source§

impl TriggerDeclarer<'_>

Source

pub fn subscriber<T: Payload>(&mut self, sub: &Subscriber<T>) -> &mut Self

Declare that the item should fire when the given subscriber receives.

Source

pub fn interval(&mut self, period: impl Into<Duration>) -> &mut Self

Declare a periodic interval trigger.

Source

pub fn deadline<T: Payload>( &mut self, sub: &Subscriber<T>, deadline: impl Into<Duration>, ) -> &mut Self

Declare a subscriber trigger that also fires the deadline if no event arrives within deadline.

Source

pub fn raw_listener(&mut self, listener: Arc<RawListener>) -> &mut Self

Escape hatch — attach a raw iceoryx2 listener directly.

Source

pub fn server<Req, Resp>(&mut self, srv: &Server<Req, Resp>) -> &mut Self
where Req: ZeroCopySend + Default + Debug + Copy + 'static, Resp: ZeroCopySend + Default + Debug + Copy + 'static,

Declare that the item should fire when the server receives a request.

Source

pub fn client<Req, Resp>(&mut self, cl: &Client<Req, Resp>) -> &mut Self
where Req: ZeroCopySend + Default + Debug + Copy + 'static, Resp: ZeroCopySend + Default + Debug + Copy + 'static,

Declare that the item should fire when the client receives a response.

Auto Trait Implementations§

§

impl<'a> Freeze for TriggerDeclarer<'a>

§

impl<'a> !RefUnwindSafe for TriggerDeclarer<'a>

§

impl<'a> !Send for TriggerDeclarer<'a>

§

impl<'a> !Sync for TriggerDeclarer<'a>

§

impl<'a> Unpin for TriggerDeclarer<'a>

§

impl<'a> UnsafeUnpin for TriggerDeclarer<'a>

§

impl<'a> !UnwindSafe for TriggerDeclarer<'a>

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.