Struct dbus::nonblock::SyncConnection [−][src]
A connection to D-Bus, Send + Sync + async version
Implementations
impl SyncConnection
[src]
pub fn unique_name(&self) -> BusName<'_>
[src]
Get the connection's unique name.
It's usually something like ":1.54"
pub async fn request_name<'a, N: Into<BusName<'a>>>(
&self,
name: N,
allow_replacement: bool,
replace_existing: bool,
do_not_queue: bool
) -> Result<RequestNameReply, Error>
[src]
&self,
name: N,
allow_replacement: bool,
replace_existing: bool,
do_not_queue: bool
) -> Result<RequestNameReply, Error>
Request a name on the D-Bus.
For detailed information on the flags and return values, see the libdbus documentation.
pub async fn release_name<'a, N: Into<BusName<'a>>>(
&self,
name: N
) -> Result<ReleaseNameReply, Error>
[src]
&self,
name: N
) -> Result<ReleaseNameReply, Error>
Release a previously requested name on the D-Bus.
pub async fn add_match(
&self,
match_rule: MatchRule<'static>
) -> Result<MsgMatch, Error>
[src]
&self,
match_rule: MatchRule<'static>
) -> Result<MsgMatch, Error>
Adds a new match to the connection, and sets up a callback when this message arrives.
The returned value can be used to remove the match.
pub async fn add_match_no_cb(&self, match_str: &str) -> Result<(), Error>
[src]
Adds a new match to the connection, without setting up a callback when this message arrives.
pub async fn remove_match_no_cb(&self, match_str: &str) -> Result<(), Error>
[src]
Removes a match from the connection, without removing any callbacks.
pub async fn remove_match(&self, id: Token) -> Result<(), Error>
[src]
Removes a previously added match and callback from the connection.
Trait Implementations
impl AsRef<Channel> for SyncConnection
[src]
impl From<Channel> for SyncConnection
[src]
impl MatchingReceiver for SyncConnection
[src]
type F = Box<dyn FnMut(Message, &SyncConnection) -> bool + Send + 'static>
Type of callback
fn start_receive(&self, m: MatchRule<'static>, f: Self::F) -> Token
[src]
fn stop_receive(&self, id: Token) -> Option<(MatchRule<'static>, Self::F)>
[src]
impl NonblockReply for SyncConnection
[src]
type F = Box<dyn FnOnce(Message, &SyncConnection) + Send + 'static>
Callback type
fn send_with_reply(&self, msg: Message, f: Self::F) -> Result<Token, ()>
[src]
fn cancel_reply(&self, id: Token) -> Option<Self::F>
[src]
fn make_f<G: FnOnce(Message, &Self) + Send + 'static>(g: G) -> Self::F
[src]
fn timeout_maker(&self) -> Option<TimeoutMakerCb>
[src]
fn set_timeout_maker(
&mut self,
f: Option<TimeoutMakerCb>
) -> Option<TimeoutMakerCb>
[src]
&mut self,
f: Option<TimeoutMakerCb>
) -> Option<TimeoutMakerCb>
fn set_waker(&mut self, f: Option<WakerCb>) -> Option<WakerCb>
[src]
impl Process for SyncConnection
[src]
fn process_one(&self, msg: Message)
[src]
fn process_all(&self)
[src]
impl Sender for SyncConnection
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SyncConnection
[src]
impl Send for SyncConnection
[src]
impl Sync for SyncConnection
[src]
impl Unpin for SyncConnection
[src]
impl !UnwindSafe for SyncConnection
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,