Struct varlink::Call

source ·
pub struct Call<'a> {
    pub writer: &'a mut dyn Write,
    pub request: Option<&'a Request<'a>>,
    /* private fields */
}
Expand description

Call is a struct, which is passed as the first argument to the interface methods in a derived form.

See also the CallTrait to use with the first Call parameter

If your varlink method is called TestMethod, the rust method to be implemented is called test_method. The first parameter is of type Call_TestMethod, which has the method reply().

Examples

 fn test_method(&self, call: &mut Call_TestMethod, /* more arguments */) -> varlink::Result<()> {
     /* ... */
     return call.reply( /* more arguments */ );
 }

Fields§

§writer: &'a mut dyn Write§request: Option<&'a Request<'a>>

Implementations§

Trait Implementations§

True, if this request does not want a reply.

True, if this request accepts more than one reply.

Don’t use this directly. Rather use the standard reply() method.
Set this to true to indicate, that more replies are following. Read more
reply with the standard varlink org.varlink.service.MethodNotFound error
reply with the standard varlink org.varlink.service.MethodNotImplemented error
reply with the standard varlink org.varlink.service.InvalidParameter error

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.