pub struct StateId(/* private fields */);Expand description
Enforced: “<machine_id>.<step_id>.<state_local_id>”
Implementations§
Source§impl StateId
impl StateId
Sourcepub fn new(value: impl Into<String>) -> Result<Self, IdValidationError>
pub fn new(value: impl Into<String>) -> Result<Self, IdValidationError>
Creates a state identifier after validating the <machine>.<step>.<state> shape.
Each segment must satisfy the same naming contract as OpId.
§Examples
use mfm_machine::ids::StateId;
let state_id = StateId::new("portfolio_snapshot.fetch_balances.read_eth")?;
assert_eq!(state_id.as_str(), "portfolio_snapshot.fetch_balances.read_eth");Trait Implementations§
Source§impl<'de> Deserialize<'de> for StateId
impl<'de> Deserialize<'de> for StateId
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
impl Eq for StateId
impl StructuralPartialEq for StateId
Auto Trait Implementations§
impl Freeze for StateId
impl RefUnwindSafe for StateId
impl Send for StateId
impl Sync for StateId
impl Unpin for StateId
impl UnsafeUnpin for StateId
impl UnwindSafe for StateId
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