Skip to main content

ObjectRef

Struct ObjectRef 

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

A reference to a CORBA object, from an IOR.

Invocations try each IIOP profile of the IOR, and each address in it, until one can be reached. An address of the ORB’s own server side is not reached through the network: the request is dispatched on the calling thread. A LOCATION_FORWARD reply makes the reference use the forwarded IOR from then on (shared by its clones); when the forwarded object cannot be reached any more, the original IOR is used again.

Implementations§

Source§

impl ObjectRef

Source

pub fn create_request(&self, operation: &str) -> DiiRequest

CORBA::Object::_request: a DiiRequest for operation, with no arguments and a void result.

Source§

impl ObjectRef

Source

pub fn ior(&self) -> &Ior

The IOR the reference was created from.

Source

pub fn effective_ior(&self) -> Ior

The IOR invocations currently go to: the last forwarded one, or the original.

Source

pub fn type_id(&self) -> &str

The repository id in the IOR, which may be empty.

Source

pub fn orb(&self) -> &Orb

The ORB the reference belongs to.

Source

pub fn is_equivalent(&self, other: &ObjectRef) -> bool

CORBA::Object::_is_equivalent: whether both references have the same profiles, so they certainly denote the same object. false does not mean they are different objects.

Source

pub fn request<'a>(&'a self, operation: &str) -> Request<'a>

Starts a request for operation.

Source

pub fn request_async<'a>(&'a self, operation: &str) -> AsyncRequest<'a>

Starts a request for operation that runs as a future (AsyncRequest).

Source

pub fn set_call_timeout(&self, timeout: Option<Option<Duration>>)

Sets how long calls on this reference and its clones wait for a reply: Some(t) (where t is None for no limit) overrides the ORB’s call_timeout and the calling thread’s (set_thread_call_timeout), and None unsets it. Like omniORB’s setClientCallTimeout(obj, millisecs). References made from the same IOR by Orb::string_to_object do not share it.

Source

pub fn call_timeout(&self) -> Option<Option<Duration>>

The setting of set_call_timeout.

Source

pub fn is_a(&self, repository_id: &str) -> Result<bool, Exception>

CORBA::Object::_is_a.

Source

pub fn non_existent(&self) -> Result<bool, Exception>

CORBA::Object::_non_existent. OBJECT_NOT_EXIST from the server counts as true.

Source

pub async fn is_a_async(&self, repository_id: &str) -> Result<bool, Exception>

The async form of is_a.

Source

pub async fn non_existent_async(&self) -> Result<bool, Exception>

The async form of non_existent.

Source

pub fn locate(&self) -> Result<bool, Exception>

Sends a LocateRequest, following forwards. Returns whether the server has the object (OBJECT_HERE) or not (UNKNOWN_OBJECT).

Source

pub fn locate_async( &self, ) -> impl Future<Output = Result<bool, Exception>> + Send + '_

The async form of locate.

Source

pub fn validate_connection(&self) -> Result<bool, Exception>

CORBA::Object::validate_connection: binds the reference with a LocateRequest (following forwards) and returns true. rustorb has no policy that can forbid a call, so it never returns false. The failure to bind raises its exception (TRANSIENT, TIMEOUT…), and an object the server does not have OBJECT_NOT_EXIST.

Source§

impl ObjectRef

Source

pub fn set_policy_overrides( &self, policies: &[PolicyValue], set_add: SetOverrideType, ) -> Result<ObjectRef, SystemException>

CORBA::Object::set_policy_overrides: a new reference to the same object with these overrides, whose call timeout is its own (this reference is unchanged). A RelativeRoundtripTimeoutPolicy sets the new reference’s call_timeout. NO_PERMISSION for a POA policy.

Source

pub fn policy_overrides(&self, types: &[PolicyType]) -> Vec<PolicyValue>

CORBA::Object::get_policy_overrides: the overrides of this reference of the types types, or all of them when types is empty.

Source

pub fn client_policy(&self, policy_type: PolicyType) -> Option<PolicyValue>

CORBA::Object::get_client_policy, and get_policy (rustorb reads no policies from IORs): the policy of type policy_type that applies to calls from this thread, from the reference’s overrides, else the thread’s, else the ORB’s. None when no scope has one, which for the timeout means calls have no limit.

Trait Implementations§

Source§

impl Clone for ObjectRef

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectRef

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ObjectRef

Source§

fn eq(&self, other: &ObjectRef) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.