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§
source§impl<'a> CallTrait for Call<'a>
impl<'a> CallTrait for Call<'a>
source§fn wants_more(&self) -> bool
fn wants_more(&self) -> bool
True, if this request accepts more than one reply.
source§fn reply_struct(&mut self, reply: Reply) -> Result<()>
fn reply_struct(&mut self, reply: Reply) -> Result<()>
Don’t use this directly. Rather use the standard
reply()
method.source§fn set_continues(&mut self, cont: bool)
fn set_continues(&mut self, cont: bool)
Set this to
true
to indicate, that more replies are following. Read morefn to_upgraded(&mut self)
fn get_request(&self) -> Option<&Request<'_>>
source§fn reply_method_not_found(&mut self, method_name: String) -> Result<()>
fn reply_method_not_found(&mut self, method_name: String) -> Result<()>
reply with the standard varlink
org.varlink.service.MethodNotFound
error