Struct varlink::Call
[−]
[src]
pub struct Call<'a> { pub request: Option<&'a Request>, // some fields omitted }
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
#Examples
If your varlink method is called TestMethod
, the rust method to be implemented is called
test_method
. The first parameter is of type _CallTestMethod
, which has the method reply()
.
Examples
fn test_method(&self, call: &mut _CallTestMethod, /* more arguments */) -> io::Result<()> { /* ... */ return call.reply( /* more arguments */ ); }
Fields
request: Option<&'a Request>
Methods
impl<'a> Call<'a>
[src]
pub fn is_oneshot(&self) -> bool
[src]
True, if this request does not want a reply.
pub fn wants_more(&self) -> bool
[src]
True, if this request accepts more than one reply.
Trait Implementations
impl<'a> CallTrait for Call<'a>
[src]
fn reply_struct(&mut self, reply: Reply) -> Result<()>
[src]
Don't use this directly. Rather use the standard reply()
method.
fn set_continues(&mut self, cont: bool)
[src]
Set this to true
to indicate, that more replies are following. Read more
fn reply_method_not_found(&mut self, method_name: Option<String>) -> Result<()>
[src]
reply with the standard varlink org.varlink.service.MethodNotFound
error
fn reply_method_not_implemented(
&mut self,
method_name: Option<String>
) -> Result<()>
[src]
&mut self,
method_name: Option<String>
) -> Result<()>
reply with the standard varlink org.varlink.service.MethodNotImplemented
error
fn reply_invalid_parameter(
&mut self,
parameter_name: Option<String>
) -> Result<()>
[src]
&mut self,
parameter_name: Option<String>
) -> Result<()>
reply with the standard varlink org.varlink.service.InvalidParameter
error