[−][src]Struct dbus_crossroads::IfaceBuilder
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]
&mut self,
name: N
) -> PropBuilder<T, A>
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]
&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,
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]
&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,
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]
&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,
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]
&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,
pub fn signal<A, N>(&mut self, name: N, args: A::strs) -> &mut SignalDesc where
A: ArgAll,
N: Into<Member<'static>>,
[src]
A: ArgAll,
N: Into<Member<'static>>,
pub fn annotate<N: Into<String>, V: Into<String>>(
self,
name: N,
value: V
) -> Self
[src]
self,
name: N,
value: V
) -> Self
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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,