[][src]Trait dbus::nonblock::NonblockReply

pub trait NonblockReply {
    type F;
    fn send_with_reply(&self, msg: Message, f: Self::F) -> Result<Token, ()>;
fn cancel_reply(&self, id: Token) -> Option<Self::F>;
fn make_f<G: FnOnce(Message, &Self) + Send + 'static>(g: G) -> Self::F
    where
        Self: Sized
;
fn set_timeout_maker(
        &mut self,
        f: Option<TimeoutMakerCb>
    ) -> Option<TimeoutMakerCb>;
fn timeout_maker(&self) -> Option<TimeoutMakerCb>;
fn set_waker(&mut self, f: Option<WakerCb>) -> Option<WakerCb>; }

Internal helper trait for async method replies.

Associated Types

type F

Callback type

Loading content...

Required methods

fn send_with_reply(&self, msg: Message, f: Self::F) -> Result<Token, ()>

Sends a message and calls the callback when a reply is received.

fn cancel_reply(&self, id: Token) -> Option<Self::F>

Cancels a pending reply.

fn make_f<G: FnOnce(Message, &Self) + Send + 'static>(g: G) -> Self::F where
    Self: Sized

Internal helper function that creates a callback.

fn set_timeout_maker(
    &mut self,
    f: Option<TimeoutMakerCb>
) -> Option<TimeoutMakerCb>

Set the internal timeout maker

fn timeout_maker(&self) -> Option<TimeoutMakerCb>

Get the internal timeout maker

fn set_waker(&mut self, f: Option<WakerCb>) -> Option<WakerCb>

Set the wakeup call

Loading content...

Implementors

impl NonblockReply for Connection[src]

type F = Box<dyn FnOnce(Message, &Connection) + Send + 'static>

impl NonblockReply for LocalConnection[src]

type F = Box<dyn FnOnce(Message, &LocalConnection) + 'static>

impl NonblockReply for SyncConnection[src]

type F = Box<dyn FnOnce(Message, &SyncConnection) + Send + 'static>

Loading content...