Enum scir::InstancePathCellRef
source · pub enum InstancePathCellRef<V0, V1> {
Id(V0),
Name(V1),
}
Expand description
The cell within an InstancePath
.
Variants§
Implementations§
source§impl<V0, V1> InstancePathCellRef<V0, V1>
impl<V0, V1> InstancePathCellRef<V0, V1>
sourcepub fn unwrap_id(self) -> V0
pub fn unwrap_id(self) -> V0
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<&V0>
pub fn get_id(&self) -> Option<&V0>
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<V0>
pub fn into_id(self) -> Option<V0>
Returns the value contained in this variant.
Returns None
if the enum value is not of the expected variant.
sourcepub fn unwrap_name(self) -> V1
pub fn unwrap_name(self) -> V1
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<&V1>
pub fn get_name(&self) -> Option<&V1>
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<V1>
pub fn into_name(self) -> Option<V1>
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<&V0, &V1>
pub fn as_ref(&self) -> InstancePathCellRef<&V0, &V1>
Converts generic types to references.
For example, transforms the type parameter T
to &T
.
sourcepub fn as_mut(&mut self) -> InstancePathCellRef<&mut V0, &mut V1>
pub fn as_mut(&mut self) -> InstancePathCellRef<&mut V0, &mut V1>
Converts generic types to mutable references.
For example, transforms the type parameter T
to &mut T
.