Skip to main content

ServerRequest

Struct ServerRequest 

Source
pub struct ServerRequest { /* private fields */ }
Expand description

CORBA::ServerRequest: a request to a DynamicImplementation.

It owns what it needs of the request, so a binding can keep it while it calls into its language.

Implementations§

Source§

impl ServerRequest

Source

pub fn new( operation: &str, input: &InStream<'_>, ) -> Result<ServerRequest, SystemException>

The request for operation whose arguments input (the stream a servant’s dispatch gets, nothing read from it yet) holds.

Source

pub fn operation(&self) -> &str

Source

pub fn arguments( &mut self, parameters: Vec<NamedValue>, ) -> Result<&mut [NamedValue], SystemException>

Reads the in and inout arguments into parameters (whose TypeCodes and modes describe the operation’s parameters, in order) and keeps them; the servant then sets the out and inout values in the returned slice (or later in parameters_mut). Called once: again is BAD_INV_ORDER. Arguments that do not match the types are MARSHAL, completed no.

Source

pub fn parameters_mut(&mut self) -> Option<&mut [NamedValue]>

The parameters given to arguments.

Source

pub fn set_result(&mut self, value: Any) -> Result<(), SystemException>

Sets the return value (for an operation with a void result, an Any of type void, or none at all). BAD_INV_ORDER before arguments or after set_exception.

Source

pub fn set_exception(&mut self, value: Any) -> Result<(), SystemException>

Makes the reply the user exception value (an Any of a tk_except TypeCode; another is BAD_PARAM). A system exception is returned from DynamicImplementation::invoke instead.

Source

pub fn write_reply(self, reply: &mut ServerReply) -> Result<(), SystemException>

Writes the reply: the user exception, or the return value and the out and inout arguments in order. A value that does not fit its type (an out argument left without a value, say) is BAD_PARAM.

Trait Implementations§

Source§

impl Debug for ServerRequest

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.