pub struct NamingContextExt { /* private fields */ }Expand description
A stub for CosNaming::NamingContextExt: a NamingContext (which it
dereferences to) that also works with stringified names and
corbaname: URLs.
Implementations§
Source§impl NamingContextExt
impl NamingContextExt
Sourcepub fn narrow(
obj: ObjectRef,
) -> Result<Option<NamingContextExt>, SystemException>
pub fn narrow( obj: ObjectRef, ) -> Result<Option<NamingContextExt>, SystemException>
Narrows obj to a NamingContextExt: None if it is not one. Asks
the object (_is_a) unless the IOR’s type id is the repository id
of NamingContextExt.
Sourcepub fn unchecked_narrow(obj: ObjectRef) -> NamingContextExt
pub fn unchecked_narrow(obj: ObjectRef) -> NamingContextExt
Uses obj as a NamingContextExt without checking its type.
Sourcepub fn context(&self) -> &NamingContext
pub fn context(&self) -> &NamingContext
The context as a plain NamingContext.
Sourcepub fn stub(&self) -> &NamingContextExt
pub fn stub(&self) -> &NamingContextExt
The generated stub.
Sourcepub fn to_string(&self, n: &[NameComponent]) -> Result<String, NamingError>
pub fn to_string(&self, n: &[NameComponent]) -> Result<String, NamingError>
to_string: the naming service writes n as a stringified name.
Raises InvalidName. to_string does the same
locally.
Sourcepub fn to_name(&self, sn: &str) -> Result<Name, NamingError>
pub fn to_name(&self, sn: &str) -> Result<Name, NamingError>
to_name: the naming service parses a stringified name. Raises
InvalidName. to_name does the same locally.
Sourcepub fn to_url(&self, addr: &str, sn: &str) -> Result<String, NamingError>
pub fn to_url(&self, addr: &str, sn: &str) -> Result<String, NamingError>
to_url: the naming service makes a corbaname: URL from a
corbaloc address list and a stringified name. Raises
InvalidAddress or InvalidName. to_url does
the same locally.
Sourcepub fn resolve_str(&self, sn: &str) -> Result<Option<ObjectRef>, NamingError>
pub fn resolve_str(&self, sn: &str) -> Result<Option<ObjectRef>, NamingError>
resolve_str: resolves a stringified name. Raises NotFound,
CannotProceed or InvalidName.
Methods from Deref<Target = NamingContext>§
Sourcepub fn stub(&self) -> &NamingContext
pub fn stub(&self) -> &NamingContext
The generated stub.
Sourcepub fn bind(
&self,
n: &[NameComponent],
obj: &ObjectRef,
) -> Result<(), NamingError>
pub fn bind( &self, n: &[NameComponent], obj: &ObjectRef, ) -> Result<(), NamingError>
bind: binds n to obj. Raises NotFound, CannotProceed,
InvalidName or AlreadyBound.
Sourcepub fn rebind(
&self,
n: &[NameComponent],
obj: &ObjectRef,
) -> Result<(), NamingError>
pub fn rebind( &self, n: &[NameComponent], obj: &ObjectRef, ) -> Result<(), NamingError>
rebind: binds n to obj, replacing an object binding. Raises
NotFound, CannotProceed or InvalidName.
Sourcepub fn bind_context(
&self,
n: &[NameComponent],
nc: &NamingContext,
) -> Result<(), NamingError>
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.
Sourcepub fn rebind_context(
&self,
n: &[NameComponent],
nc: &NamingContext,
) -> Result<(), NamingError>
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.
Sourcepub fn resolve(
&self,
n: &[NameComponent],
) -> Result<Option<ObjectRef>, NamingError>
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.
Sourcepub fn unbind(&self, n: &[NameComponent]) -> Result<(), NamingError>
pub fn unbind(&self, n: &[NameComponent]) -> Result<(), NamingError>
unbind: removes the binding of n. Raises NotFound,
CannotProceed or InvalidName.
Sourcepub fn new_context(&self) -> Result<NamingContext, NamingError>
pub fn new_context(&self) -> Result<NamingContext, NamingError>
new_context: a new context, not bound to any name, in the same
naming service.
Sourcepub fn bind_new_context(
&self,
n: &[NameComponent],
) -> Result<NamingContext, NamingError>
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.
Sourcepub fn destroy(&self) -> Result<(), NamingError>
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.
Sourcepub fn list(
&self,
how_many: u32,
) -> Result<(Vec<Binding>, Option<BindingIterator>), NamingError>
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.