Struct zbus::SignalContext
source · pub struct SignalContext<'s> { /* private fields */ }
Expand description
A signal emission context.
For signal emission using the high-level API, you’ll need instances of this type.
See crate::InterfaceRef::signal_context
and crate::dbus_interface
documentation for details and examples of this type in use.
Implementations§
source§impl<'s> SignalContext<'s>
impl<'s> SignalContext<'s>
sourcepub fn new<P>(conn: &Connection, path: P) -> Result<Self>where
P: TryInto<ObjectPath<'s>>,
P::Error: Into<Error>,
pub fn new<P>(conn: &Connection, path: P) -> Result<Self>where
P: TryInto<ObjectPath<'s>>,
P::Error: Into<Error>,
Create a new signal context for the given connection and object path.
sourcepub fn from_parts(conn: Connection, path: ObjectPath<'s>) -> Self
pub fn from_parts(conn: Connection, path: ObjectPath<'s>) -> Self
Create a new signal context for the given connection and object path.
sourcepub fn connection(&self) -> &Connection
pub fn connection(&self) -> &Connection
Get a reference to the associated connection.
sourcepub fn path(&self) -> &ObjectPath<'s>
pub fn path(&self) -> &ObjectPath<'s>
Get a reference to the associated object path.
sourcepub fn to_owned(&self) -> SignalContext<'static>
pub fn to_owned(&self) -> SignalContext<'static>
Creates an owned clone of self
.
sourcepub fn into_owned(self) -> SignalContext<'static>
pub fn into_owned(self) -> SignalContext<'static>
Creates an owned clone of self
.
Trait Implementations§
source§impl<'s> Clone for SignalContext<'s>
impl<'s> Clone for SignalContext<'s>
source§fn clone(&self) -> SignalContext<'s>
fn clone(&self) -> SignalContext<'s>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more