[][src]Struct dbus_crossroads::IfaceBuilder

pub struct IfaceBuilder<T: Send + 'static>(_, _);

Struct used to build an interface.

You get an instance of this struct in the call to Crossroads::register.

Register new methods, properties and signals using the corresponding functions on this struct. You might find several similar functions, e g method, method_with_cr, method_with_cr_async and method_with_cr_custom. Methods that have "with_cr" will allow you to access the full mutable Crossroads instance, but beware - trying to recursively handle methods from within a method handler is not allowed and may cause panics.

Methods that have "_async" will allow you to defer the result of your method. During await points, other tasks with method calls can run as separate tasks. Remember to call Crossroads::set_async_support when using async methods.

Implementations

impl<T: Send + 'static> IfaceBuilder<T>[src]

pub fn property<A: Arg, N: Into<String>>(
    &mut self,
    name: N
) -> PropBuilder<T, A>
[src]

pub fn method<IA, OA, N, CB>(
    &mut self,
    name: N,
    input_args: IA::strs,
    output_args: OA::strs,
    cb: CB
) -> &mut MethodDesc where
    IA: ArgAll + ReadAll,
    OA: ArgAll + AppendAll,
    N: Into<Member<'static>>,
    CB: FnMut(&mut Context, &mut T, IA) -> Result<OA, MethodErr> + Send + 'static, 
[src]

pub fn method_with_cr<IA, OA, N, CB>(
    &mut self,
    name: N,
    input_args: IA::strs,
    output_args: OA::strs,
    cb: CB
) -> &mut MethodDesc where
    IA: ArgAll + ReadAll,
    OA: ArgAll + AppendAll,
    N: Into<Member<'static>>,
    CB: FnMut(&mut Context, &mut Crossroads, IA) -> Result<OA, MethodErr> + Send + 'static, 
[src]

pub fn method_with_cr_custom<IA, OA, N, CB>(
    &mut self,
    name: N,
    input_args: IA::strs,
    output_args: OA::strs,
    cb: CB
) -> &mut MethodDesc where
    IA: ArgAll + ReadAll,
    OA: ArgAll + AppendAll,
    N: Into<Member<'static>>,
    CB: FnMut(Context, &mut Crossroads, IA) -> Option<Context> + Send + 'static, 
[src]

pub fn method_with_cr_async<IA, OA, N, R, CB>(
    &mut self,
    name: N,
    input_args: IA::strs,
    output_args: OA::strs,
    cb: CB
) -> &mut MethodDesc where
    IA: ArgAll + ReadAll,
    OA: ArgAll + AppendAll,
    N: Into<Member<'static>>,
    CB: FnMut(Context, &mut Crossroads, IA) -> R + Send + 'static,
    R: Future<Output = PhantomData<OA>> + Send + 'static, 
[src]

pub fn signal<A, N>(&mut self, name: N, args: A::strs) -> &mut SignalDesc where
    A: ArgAll,
    N: Into<Member<'static>>, 
[src]

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

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

Trait Implementations

impl<T: Debug + Send + 'static> Debug for IfaceBuilder<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for IfaceBuilder<T>

impl<T> Send for IfaceBuilder<T> where
    T: Sync

impl<T> !Sync for IfaceBuilder<T>

impl<T> Unpin for IfaceBuilder<T>

impl<T> !UnwindSafe for IfaceBuilder<T>

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.