[][src]Struct dbus_crossroads::PropBuilder

pub struct PropBuilder<'a, T: 'static, A: 'static>(_, _);

Struct used to describe a property when building an interface.

Implementations

impl<'_, T: Send, A: Send + RefArg + Arg + Append> PropBuilder<'_, T, A>[src]

pub fn get<CB>(self, cb: CB) -> Self where
    CB: FnMut(&mut PropContext, &mut T) -> Result<A, MethodErr> + Send + 'static, 
[src]

pub fn get_with_cr<CB>(self, cb: CB) -> Self where
    CB: FnMut(&mut PropContext, &mut Crossroads) -> Result<A, MethodErr> + Send + 'static, 
[src]

pub fn get_with_cr_async<R, CB>(self, cb: CB) -> Self where
    CB: FnMut(PropContext, &mut Crossroads) -> R + Send + 'static,
    R: Future<Output = PhantomData<(A, ())>> + Send + 'static, 
[src]

pub fn get_async<R, CB>(self, cb: CB) -> Self where
    CB: FnMut(PropContext, &mut T) -> R + Send + 'static,
    R: Future<Output = PhantomData<(A, ())>> + Send + 'static, 
[src]

impl<'_, T: Send, A: RefArg + Send + for<'x> Get<'x> + Arg + Append> PropBuilder<'_, T, A>[src]

pub fn set<CB>(self, cb: CB) -> Self where
    CB: FnMut(&mut PropContext, &mut T, A) -> Result<Option<A>, MethodErr> + Send + 'static, 
[src]

Adds a set property handler to this property.

In case an EmitsChangedSignal should be emitted, the callback should return Ok(Some(v)) where v is the value to be emitted. If no EmitsChangedSignal should be emitted, return Ok(None).

pub fn set_with_cr<CB>(self, cb: CB) -> Self where
    CB: FnMut(&mut PropContext, &mut Crossroads, A) -> Result<Option<A>, MethodErr> + Send + 'static, 
[src]

Adds a set property handler to this property, and allowing the entire tree to be changed.

In case an EmitsChangedSignal should be emitted, the callback should return Ok(Some(v)) where v is the value to be emitted. If no EmitsChangedSignal should be emitted, return Ok(None).

pub fn set_custom<CB>(self, cb: CB) -> Self where
    CB: FnMut(PropContext, &mut Crossroads, A) -> Option<PropContext> + Send + 'static, 
[src]

pub fn set_with_cr_async<CB, R>(self, cb: CB) -> Self where
    CB: FnMut(PropContext, &mut Crossroads, A) -> R + Send + 'static,
    R: Future<Output = PhantomData<Option<A>>> + Send + 'static, 
[src]

pub fn set_async<CB, R>(self, cb: CB) -> Self where
    CB: FnMut(PropContext, &mut T, A) -> R + Send + 'static,
    R: Future<Output = PhantomData<Option<A>>> + Send + 'static, 
[src]

impl<'_, T: Send, A> PropBuilder<'_, T, A>[src]

pub fn annotate<N: Into<String>, V: Into<String>>(
    self,
    name: N,
    value: V
) -> Self
[src]

pub fn deprecated(self) -> Self[src]

pub fn emits_changed_false(self) -> Self[src]

pub fn emits_changed_const(self) -> Self[src]

pub fn emits_changed_invalidates(self) -> Self[src]

pub fn emits_changed_true(self) -> Self[src]

Trait Implementations

impl<'a, T: Debug + 'static, A: Debug + 'static> Debug for PropBuilder<'a, T, A>[src]

impl<'_, T, A> Drop for PropBuilder<'_, T, A>[src]

Auto Trait Implementations

impl<'a, T, A> !RefUnwindSafe for PropBuilder<'a, T, A>

impl<'a, T, A> Send for PropBuilder<'a, T, A> where
    A: Sync,
    T: Sync

impl<'a, T, A> !Sync for PropBuilder<'a, T, A>

impl<'a, T, A> Unpin for PropBuilder<'a, T, A>

impl<'a, T, A> !UnwindSafe for PropBuilder<'a, T, A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.