Struct async_rustbus::conn::Conn

source ·
pub struct Conn { /* private fields */ }
Expand description

A synchronous non-blocking connection to DBus session.

Most people will want to use RpcConn. This is a low-level struct used by RpcConn to read and write messages to/from the DBus socket. It does minimal processing of data and provides no Async interfaces.

Notes

  • If you are interested in synchronous interface for DBus, the rustbus is a better solution.

Implementations§

source§

impl Conn

source

pub async fn connect_to_addr<P: AsRef<Path>, S: ToSocketAddrs, B: AsRef<[u8]>>( addr: &DBusAddr<P, S, B>, with_fd: bool ) -> Result<Self>

source

pub async fn connect_to_path<P: AsRef<Path>>( p: P, with_fd: bool ) -> Result<Self>

source

pub fn get_next_message(&mut self) -> Result<MarshalledMessage>

source

pub fn finish_sending_next(&mut self) -> Result<u64>

source

pub fn write_next_message( &mut self, msg: &MarshalledMessage ) -> Result<(Option<u64>, Option<u32>)>

Trait Implementations§

source§

impl AsRawFd for Conn

source§

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Conn

§

impl Send for Conn

§

impl Sync for Conn

§

impl Unpin for Conn

§

impl UnwindSafe for Conn

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.