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

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§

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.