pub struct ComponentId { /* private fields */ }Expand description
Stable identity of one component in a PowerIO value.
The component type qualifies the source supplied or PowerIO assigned local
identity. This keeps, for example, a load named main distinct from a
generator named main without exposing a table row position.
Implementations§
Source§impl ComponentId
impl ComponentId
Sourcepub fn new(
component_type: impl Into<String>,
local_id: impl Into<String>,
) -> Result<Self, Error>
pub fn new( component_type: impl Into<String>, local_id: impl Into<String>, ) -> Result<Self, Error>
Construct a component identity from its structural type and local identity.
§Errors
Either part is empty, contains NUL, or exceeds the common identifier bound.
Sourcepub fn component_type(&self) -> &str
pub fn component_type(&self) -> &str
The component’s structural type, such as load or switch.
Trait Implementations§
Source§impl Clone for ComponentId
impl Clone for ComponentId
Source§impl Debug for ComponentId
impl Debug for ComponentId
Source§impl<'de> Deserialize<'de> for ComponentId
impl<'de> Deserialize<'de> for ComponentId
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ComponentId
impl Display for ComponentId
impl Eq for ComponentId
Source§impl Hash for ComponentId
impl Hash for ComponentId
Source§impl Ord for ComponentId
impl Ord for ComponentId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ComponentId
impl PartialEq for ComponentId
Source§impl PartialOrd for ComponentId
impl PartialOrd for ComponentId
Source§impl Serialize for ComponentId
impl Serialize for ComponentId
impl StructuralPartialEq for ComponentId
Auto Trait Implementations§
impl Freeze for ComponentId
impl RefUnwindSafe for ComponentId
impl Send for ComponentId
impl Sync for ComponentId
impl Unpin for ComponentId
impl UnsafeUnpin for ComponentId
impl UnwindSafe for ComponentId
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