pub struct ContractId(String);Expand description
Stable identifier used for routes, actions, policies, and other cross-linked declarations.
§Fields
- This type stores module-owned state for
crate::application_ir::ContractId.
§Examples
ⓘ
let _ = std::mem::size_of::<pharos_runtime_core::application_ir::ContractId>();§Related
crate::application_irfor constructors, helpers, and neighboring runtime types.
Tuple Fields§
§0: StringImplementations§
Source§impl ContractId
impl ContractId
Sourcepub fn parse(value: &str) -> Result<Self, ApplicationIrError>
pub fn parse(value: &str) -> Result<Self, ApplicationIrError>
Parses one validated contract identifier.
§Parameters
value: Input consumed by [crate::application_ir::parse].
§Returns
Returns the successful value produced by [crate::application_ir::parse] or an error when the operation fails.
§Errors
Returns an error value when [crate::application_ir::parse] cannot complete successfully.
§Performance
Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by [crate::application_ir::parse].
§Examples
ⓘ
let _result = pharos_runtime_core::application_ir::parse("value");§Related
crate::application_irfor adjacent helpers that share the same runtime surface.
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the canonical identifier text.
§Returns
Returns the computed value produced by [crate::application_ir::as_str].
§Examples
ⓘ
let _result = pharos_runtime_core::application_ir::as_str();§Related
crate::application_irfor adjacent helpers that share the same runtime surface.
Trait Implementations§
Source§impl Clone for ContractId
impl Clone for ContractId
Source§fn clone(&self) -> ContractId
fn clone(&self) -> ContractId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContractId
impl Debug for ContractId
Source§impl Ord for ContractId
impl Ord for ContractId
Source§fn cmp(&self, other: &ContractId) -> Ordering
fn cmp(&self, other: &ContractId) -> Ordering
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
Source§impl PartialEq for ContractId
impl PartialEq for ContractId
Source§fn eq(&self, other: &ContractId) -> bool
fn eq(&self, other: &ContractId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ContractId
impl PartialOrd for ContractId
impl Eq for ContractId
impl StructuralPartialEq for ContractId
Auto Trait Implementations§
impl Freeze for ContractId
impl RefUnwindSafe for ContractId
impl Send for ContractId
impl Sync for ContractId
impl Unpin for ContractId
impl UnsafeUnpin for ContractId
impl UnwindSafe for ContractId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.