pub struct DiiRequest { /* private fields */ }Expand description
CORBA::Request: a call whose operation, arguments, result type and
user exceptions are given at run time.
After a call the out and inout arguments hold the values the server
sent and result the return value. A user
exception comes back as Exception::User;
exception_value decodes it with the
TypeCodes given by add_exception.
Implementations§
Source§impl DiiRequest
impl DiiRequest
pub fn target(&self) -> &ObjectRef
pub fn operation(&self) -> &str
Sourcepub fn arguments(&self) -> &[NamedValue]
pub fn arguments(&self) -> &[NamedValue]
The arguments (CORBA::NVList), in order.
Sourcepub fn arguments_mut(&mut self) -> &mut Vec<NamedValue>
pub fn arguments_mut(&mut self) -> &mut Vec<NamedValue>
The arguments, to change or add to before a call.
pub fn add_in_arg(&mut self, name: &str, value: Any) -> &mut DiiRequest
pub fn add_inout_arg(&mut self, name: &str, value: Any) -> &mut DiiRequest
pub fn add_out_arg(&mut self, name: &str, tc: TypeCode) -> &mut DiiRequest
Sourcepub fn set_return_type(&mut self, tc: TypeCode) -> &mut DiiRequest
pub fn set_return_type(&mut self, tc: TypeCode) -> &mut DiiRequest
The type of the return value (void until set).
Sourcepub fn add_exception(&mut self, tc: TypeCode) -> &mut DiiRequest
pub fn add_exception(&mut self, tc: TypeCode) -> &mut DiiRequest
Adds a user exception the operation may raise (CORBA::ExceptionList).
pub fn exceptions(&self) -> &[TypeCode]
Sourcepub fn set_timeout(&mut self, timeout: Option<Duration>) -> &mut DiiRequest
pub fn set_timeout(&mut self, timeout: Option<Duration>) -> &mut DiiRequest
Request::timeout for the calls of this
request.
Sourcepub async fn invoke_async(&mut self) -> Result<(), Exception>
pub async fn invoke_async(&mut self) -> Result<(), Exception>
invoke as a future (see
AsyncRequest).
Sourcepub fn send_oneway(&self) -> Result<(), SystemException>
pub fn send_oneway(&self) -> Result<(), SystemException>
Sends the request as a oneway call.
Sourcepub fn send_deferred(&mut self) -> Result<(), SystemException>
pub fn send_deferred(&mut self) -> Result<(), SystemException>
Sends the request without waiting: the reply is collected by
poll_response and
get_response. The arguments are taken
now. A request still waiting for its response cannot be sent again
(BAD_INV_ORDER).
Sourcepub fn poll_response(&mut self) -> Result<bool, SystemException>
pub fn poll_response(&mut self) -> Result<bool, SystemException>
Whether the response of send_deferred
has arrived. BAD_INV_ORDER when nothing was sent deferred.
Sourcepub fn get_response(&mut self) -> Result<(), Exception>
pub fn get_response(&mut self) -> Result<(), Exception>
Waits for the response of send_deferred
and takes it like invoke. BAD_INV_ORDER
when nothing was sent deferred.
Sourcepub fn exception_value(&self, e: &UserException) -> Result<Any, SystemException>
pub fn exception_value(&self, e: &UserException) -> Result<Any, SystemException>
The user exception e of a call of this request as an Any, with the
TypeCode of exceptions of the same
repository id. An exception that is not listed is UNKNOWN,
completed yes.