pub struct PropContext { /* private fields */ }Expand description
PropContext is a struct that provides helpful information inside a get/set property handler.
Like Context, but for get/set property handlers.
Implementations§
Source§impl PropContext
impl PropContext
Sourcepub fn message(&self) -> Option<&Message>
pub fn message(&self) -> Option<&Message>
The message, if any, that caused this method to be called.
Sourcepub fn reply<A: Arg + RefArg + Send + Append + 'static>(
&mut self,
reply: Result<A, MethodErr>,
) -> PhantomData<A>
pub fn reply<A: Arg + RefArg + Send + Append + 'static>( &mut self, reply: Result<A, MethodErr>, ) -> PhantomData<A>
Set a reply to message (use in async context only)
Returns PhantomData just to aid the type system
Sourcepub fn reply_noemit(&mut self, reply: Result<(), MethodErr>)
pub fn reply_noemit(&mut self, reply: Result<(), MethodErr>)
Set a reply to a “set property” message (use in async context only)
This can be used when the property does not send a “EmitsChanged” signal.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PropContext
impl !RefUnwindSafe for PropContext
impl Send for PropContext
impl !Sync for PropContext
impl Unpin for PropContext
impl !UnwindSafe for PropContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more