Struct cm_moniker::InstancedChildName
source · pub struct InstancedChildName { /* private fields */ }
Expand description
An instanced child moniker locally identifies a child component instance using the name assigned by its parent and its collection (if present). It is a building block for more complex monikers.
Display notation: “[collection:]name:instance_id”.
Implementations§
source§impl InstancedChildName
impl InstancedChildName
pub fn try_new<S>( name: S, collection: Option<S>, instance: IncarnationId ) -> Result<Self, MonikerError>
sourcepub fn static_child(name: &str) -> Result<Self, MonikerError>
pub fn static_child(name: &str) -> Result<Self, MonikerError>
Returns a moniker for a static child.
The returned value will have no collection
, and will have an instance_id
of 0.
sourcepub fn from_child_moniker(m: &ChildName, instance: IncarnationId) -> Self
pub fn from_child_moniker(m: &ChildName, instance: IncarnationId) -> Self
Converts this child moniker into an instanced moniker.
sourcepub fn without_instance_id(&self) -> ChildName
pub fn without_instance_id(&self) -> ChildName
Convert an InstancedChildName to an allocated ChildName without an InstanceId
pub fn instance(&self) -> IncarnationId
pub fn format(&self, f: &mut Formatter<'_>) -> Result
Trait Implementations§
source§impl ChildNameBase for InstancedChildName
impl ChildNameBase for InstancedChildName
source§impl Clone for InstancedChildName
impl Clone for InstancedChildName
source§fn clone(&self) -> InstancedChildName
fn clone(&self) -> InstancedChildName
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InstancedChildName
impl Debug for InstancedChildName
source§impl Display for InstancedChildName
impl Display for InstancedChildName
source§impl Hash for InstancedChildName
impl Hash for InstancedChildName
source§impl Ord for InstancedChildName
impl Ord for InstancedChildName
source§impl PartialEq for InstancedChildName
impl PartialEq for InstancedChildName
source§fn eq(&self, other: &InstancedChildName) -> bool
fn eq(&self, other: &InstancedChildName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InstancedChildName
impl PartialOrd for InstancedChildName
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&str> for InstancedChildName
impl TryFrom<&str> for InstancedChildName
impl Eq for InstancedChildName
impl StructuralPartialEq for InstancedChildName
Auto Trait Implementations§
impl Freeze for InstancedChildName
impl RefUnwindSafe for InstancedChildName
impl Send for InstancedChildName
impl Sync for InstancedChildName
impl Unpin for InstancedChildName
impl UnwindSafe for InstancedChildName
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more