Enum scir::InstancePathCell
source · pub enum InstancePathCell {
Id(CellId),
Name(ArcStr),
}
Expand description
The cell within an InstancePath
.
Variants§
Implementations§
source§impl InstancePathCell
impl InstancePathCell
sourcepub fn unwrap_id(self) -> CellId
pub fn unwrap_id(self) -> CellId
Returns the value contained in this variant.
§Panics
Panics if the enum value is not of the expected variant.
sourcepub fn get_id(&self) -> Option<&CellId>
pub fn get_id(&self) -> Option<&CellId>
Returns a reference to the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn into_id(self) -> Option<CellId>
pub fn into_id(self) -> Option<CellId>
Returns the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn unwrap_name(self) -> ArcStr
pub fn unwrap_name(self) -> ArcStr
Returns the value contained in this variant.
§Panics
Panics if the enum value is not of the expected variant.
sourcepub fn get_name(&self) -> Option<&ArcStr>
pub fn get_name(&self) -> Option<&ArcStr>
Returns a reference to the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn into_name(self) -> Option<ArcStr>
pub fn into_name(self) -> Option<ArcStr>
Returns the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn as_ref(&self) -> InstancePathCellRef<&CellId, &ArcStr>
pub fn as_ref(&self) -> InstancePathCellRef<&CellId, &ArcStr>
Converts types to references.
For example, transforms a variant field with type T
to &T
.
sourcepub fn as_mut(&mut self) -> InstancePathCellRef<&mut CellId, &mut ArcStr>
pub fn as_mut(&mut self) -> InstancePathCellRef<&mut CellId, &mut ArcStr>
Converts types to mutable references.
For example, transforms a variant field with type T
to &mut T
.
Trait Implementations§
source§impl Clone for InstancePathCell
impl Clone for InstancePathCell
source§fn clone(&self) -> InstancePathCell
fn clone(&self) -> InstancePathCell
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstancePathCell
impl Debug for InstancePathCell
source§impl<'de> Deserialize<'de> for InstancePathCell
impl<'de> Deserialize<'de> for InstancePathCell
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<CellId> for InstancePathCell
impl From<CellId> for InstancePathCell
source§impl<S: Into<ArcStr>> From<S> for InstancePathCell
impl<S: Into<ArcStr>> From<S> for InstancePathCell
source§impl Hash for InstancePathCell
impl Hash for InstancePathCell
source§impl Ord for InstancePathCell
impl Ord for InstancePathCell
source§fn cmp(&self, other: &InstancePathCell) -> Ordering
fn cmp(&self, other: &InstancePathCell) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for InstancePathCell
impl PartialEq for InstancePathCell
source§fn eq(&self, other: &InstancePathCell) -> bool
fn eq(&self, other: &InstancePathCell) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InstancePathCell
impl PartialOrd for InstancePathCell
source§fn partial_cmp(&self, other: &InstancePathCell) -> Option<Ordering>
fn partial_cmp(&self, other: &InstancePathCell) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InstancePathCell
impl Serialize for InstancePathCell
impl Eq for InstancePathCell
impl StructuralPartialEq for InstancePathCell
Auto Trait Implementations§
impl RefUnwindSafe for InstancePathCell
impl Send for InstancePathCell
impl Sync for InstancePathCell
impl Unpin for InstancePathCell
impl UnwindSafe for InstancePathCell
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.