pub struct Proxy<'a, C> {
pub destination: BusName<'a>,
pub path: Path<'a>,
pub connection: C,
pub timeout: Duration,
}
Expand description
A struct that wraps a connection, destination and path.
A D-Bus “Proxy” is a client-side object that corresponds to a remote object on the server side. Calling methods on the proxy object calls methods on the remote object. Read more in the D-Bus tutorial
Fields
destination: BusName<'a>
Destination, i e what D-Bus service you’re communicating with
path: Path<'a>
Object path on the destination
connection: C
Some way to send and/or receive messages, non-blocking.
timeout: Duration
Timeout for method calls
Implementations
sourceimpl<'a, T, C> Proxy<'a, C>where
T: NonblockReply,
C: Deref<Target = T>,
impl<'a, T, C> Proxy<'a, C>where
T: NonblockReply,
C: Deref<Target = T>,
sourcepub fn method_call<'i, 'm, R: ReadAll + 'static, A: AppendAll, I: Into<Interface<'i>>, M: Into<Member<'m>>>(
&self,
i: I,
m: M,
args: A
) -> MethodReply<R>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
pub fn method_call<'i, 'm, R: ReadAll + 'static, A: AppendAll, I: Into<Interface<'i>>, M: Into<Member<'m>>>(
&self,
i: I,
m: M,
args: A
) -> MethodReply<R>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
Make a method call using typed input argument, returns a future that resolves to the typed output arguments.
Trait Implementations
sourceimpl<'a, T: NonblockReply, C: Deref<Target = T>> Introspectable for Proxy<'a, C>
impl<'a, T: NonblockReply, C: Deref<Target = T>> Introspectable for Proxy<'a, C>
fn introspect(&self) -> MethodReply<String>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
sourceimpl<'a, T: NonblockReply, C: Deref<Target = T>> ObjectManager for Proxy<'a, C>
impl<'a, T: NonblockReply, C: Deref<Target = T>> ObjectManager for Proxy<'a, C>
fn get_managed_objects(
&self
) -> MethodReply<HashMap<Path<'static>, HashMap<String, PropMap>>>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
sourceimpl<'a, T: NonblockReply, C: Deref<Target = T>> Peer for Proxy<'a, C>
impl<'a, T: NonblockReply, C: Deref<Target = T>> Peer for Proxy<'a, C>
fn ping(&self) -> MethodReply<()>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
fn get_machine_id(&self) -> MethodReply<String>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
sourceimpl<'a, T: NonblockReply, C: Deref<Target = T>> Properties for Proxy<'a, C>
impl<'a, T: NonblockReply, C: Deref<Target = T>> Properties for Proxy<'a, C>
fn get<R0: for<'b> Get<'b> + 'static>(
&self,
interface_name: &str,
property_name: &str
) -> MethodReply<R0>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
fn get_all(&self, interface_name: &str) -> MethodReply<PropMap>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
fn set<I2: Arg + Append>(
&self,
interface_name: &str,
property_name: &str,
value: I2
) -> MethodReply<()>ⓘNotable traits for MethodReply<T>impl<T> Future for MethodReply<T> type Output = Result<T, Error>;
Auto Trait Implementations
impl<'a, C> RefUnwindSafe for Proxy<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for Proxy<'a, C>where
C: Send,
impl<'a, C> Sync for Proxy<'a, C>where
C: Sync,
impl<'a, C> Unpin for Proxy<'a, C>where
C: Unpin,
impl<'a, C> UnwindSafe for Proxy<'a, C>where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more