Skip to main content

NamingContext

Struct NamingContext 

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

A stub for CosNaming::NamingContext, over the one rustorb-idl -brust generates (crate::idl::cos_naming::NamingContext) with the names of rustorb_core::name and the errors of NamingError.

Names are given as slices of NameComponent; to_name makes one from a string such as "app/Echo".

Implementations§

Source§

impl NamingContext

Source

pub fn narrow(obj: ObjectRef) -> Result<Option<NamingContext>, SystemException>

Narrows obj to a naming context: None if it is not one. Asks the object (_is_a) unless the IOR’s type id is the repository id of NamingContext or NamingContextExt.

Source

pub fn unchecked_narrow(obj: ObjectRef) -> NamingContext

Uses obj as a naming context without checking its type.

Source

pub fn object(&self) -> &ObjectRef

The object reference.

Source

pub fn into_object(self) -> ObjectRef

The object reference.

Source

pub fn stub(&self) -> &NamingContext

The generated stub.

Source

pub fn bind( &self, n: &[NameComponent], obj: &ObjectRef, ) -> Result<(), NamingError>

bind: binds n to obj. Raises NotFound, CannotProceed, InvalidName or AlreadyBound.

Source

pub fn rebind( &self, n: &[NameComponent], obj: &ObjectRef, ) -> Result<(), NamingError>

rebind: binds n to obj, replacing an object binding. Raises NotFound, CannotProceed or InvalidName.

Source

pub fn bind_context( &self, n: &[NameComponent], nc: &NamingContext, ) -> Result<(), NamingError>

bind_context: binds n to the context nc, so that names are resolved through it. Raises NotFound, CannotProceed, InvalidName or AlreadyBound.

Source

pub fn rebind_context( &self, n: &[NameComponent], nc: &NamingContext, ) -> Result<(), NamingError>

rebind_context: binds n to the context nc, replacing a context binding. Raises NotFound, CannotProceed or InvalidName.

Source

pub fn resolve( &self, n: &[NameComponent], ) -> Result<Option<ObjectRef>, NamingError>

resolve: the object n is bound to (None if it is bound to a nil reference). Raises NotFound, CannotProceed or InvalidName.

Source

pub fn unbind(&self, n: &[NameComponent]) -> Result<(), NamingError>

unbind: removes the binding of n. Raises NotFound, CannotProceed or InvalidName.

Source

pub fn new_context(&self) -> Result<NamingContext, NamingError>

new_context: a new context, not bound to any name, in the same naming service.

Source

pub fn bind_new_context( &self, n: &[NameComponent], ) -> Result<NamingContext, NamingError>

bind_new_context: creates a context and binds it to n. Raises NotFound, CannotProceed, InvalidName or AlreadyBound.

Source

pub fn destroy(&self) -> Result<(), NamingError>

destroy: deletes this context, which must have no bindings (or NotEmpty is raised). Names bound to it elsewhere are not unbound.

Source

pub fn list( &self, how_many: u32, ) -> Result<(Vec<Binding>, Option<BindingIterator>), NamingError>

list: up to how_many bindings of this context, and an iterator over the rest if there are more.

Trait Implementations§

Source§

impl Clone for NamingContext

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 NamingContext

Source§

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

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

impl From<NamingContextExt> for NamingContext

Source§

fn from(ext: NamingContextExt) -> NamingContext

Converts to this type from the input type.

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.