Skip to main content

DiiRequest

Struct DiiRequest 

Source
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

Source

pub fn target(&self) -> &ObjectRef

Source

pub fn operation(&self) -> &str

Source

pub fn arguments(&self) -> &[NamedValue]

The arguments (CORBA::NVList), in order.

Source

pub fn arguments_mut(&mut self) -> &mut Vec<NamedValue>

The arguments, to change or add to before a call.

Source

pub fn add_in_arg(&mut self, name: &str, value: Any) -> &mut DiiRequest

Source

pub fn add_inout_arg(&mut self, name: &str, value: Any) -> &mut DiiRequest

Source

pub fn add_out_arg(&mut self, name: &str, tc: TypeCode) -> &mut DiiRequest

Source

pub fn set_return_type(&mut self, tc: TypeCode) -> &mut DiiRequest

The type of the return value (void until set).

Source

pub fn result(&self) -> &Any

The return value after a call (its type before).

Source

pub fn add_exception(&mut self, tc: TypeCode) -> &mut DiiRequest

Adds a user exception the operation may raise (CORBA::ExceptionList).

Source

pub fn exceptions(&self) -> &[TypeCode]

Source

pub fn set_timeout(&mut self, timeout: Option<Duration>) -> &mut DiiRequest

Request::timeout for the calls of this request.

Source

pub fn invoke(&mut self) -> Result<(), Exception>

Sends the request and waits for the reply.

Source

pub async fn invoke_async(&mut self) -> Result<(), Exception>

invoke as a future (see AsyncRequest).

Source

pub fn send_oneway(&self) -> Result<(), SystemException>

Sends the request as a oneway call.

Source

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).

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for DiiRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.