[][src]Struct rustbus::connection::rpc_conn::RpcConn

pub struct RpcConn { /* fields omitted */ }

Convenience wrapper around the lowlevel connection

Implementations

impl RpcConn[src]

pub fn new(conn: DuplexConn) -> Self[src]

pub fn conn(&self) -> &DuplexConn[src]

pub fn conn_mut(&mut self) -> &mut DuplexConn[src]

pub fn alloc_serial(&mut self) -> u32[src]

get the next new serial

pub fn session_conn(timeout: Timeout) -> Result<Self, Error>[src]

pub fn system_conn(timeout: Timeout) -> Result<Self, Error>[src]

pub fn connect_to_path(path: UnixAddr, timeout: Timeout) -> Result<Self, Error>[src]

pub fn set_filter(&mut self, filter: MessageFilter)[src]

pub fn try_get_response(&mut self, serial: u32) -> Option<MarshalledMessage>[src]

Return a response if one is there but dont block

pub fn wait_response(
    &mut self,
    serial: u32,
    timeout: Timeout
) -> Result<MarshalledMessage, Error>
[src]

Return a response if one is there or block until it arrives

pub fn try_get_signal(&mut self) -> Option<MarshalledMessage>[src]

Return a signal if one is there but dont block

pub fn wait_signal(
    &mut self,
    timeout: Timeout
) -> Result<MarshalledMessage, Error>
[src]

Return a sginal if one is there or block until it arrives

pub fn try_get_call(&mut self) -> Option<MarshalledMessage>[src]

Return a call if one is there but dont block

pub fn wait_call(
    &mut self,
    timeout: Timeout
) -> Result<MarshalledMessage, Error>
[src]

Return a call if one is there or block until it arrives

pub fn send_message<'a>(
    &'a mut self,
    msg: &'a mut MarshalledMessage
) -> Result<SendMessageContext<'a>, Error>
[src]

Send a message to the bus

pub fn try_refill_once(
    &mut self,
    timeout: Timeout
) -> Result<Option<MessageType>, Error>
[src]

This processes ONE message. This might be an ignored message. The result will tell you which if any message type was received. The message will be placed into the appropriate queue in the RpcConn.

If a call is received that should be filtered out an error message is sent automatically

pub fn refill_once(&mut self, timeout: Timeout) -> Result<MessageType, Error>[src]

This blocks until a new message (that should not be ignored) arrives. The message gets placed into the correct list. The Result will tell you which kind of message has been received.

If calls are received that should be filtered out an error message is sent automatically

pub fn refill_all(&mut self) -> Result<Vec<MarshalledMessage>, Error>[src]

This will drain all outstanding IO on the socket, this will never block. If there is a partially received message pending it will be collected by the next call to any of the io-performing functions. For the callers convenience the Error::Timedout resulting of the EAGAIN/EWOULDBLOCK errors are converted to Ok(()) before returning, since these are expected to happen to normally exit this function.

This will not send automatic error messages for calls to unknown methods because it does never block, but error replies should always be sent. For this reason replies to all filtered calls are collected and returned. The original messages are dropped immediatly, so it should keep memory usage relatively low. The caller is responsible to send these error replies over the RpcConn, at a convenient time.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.