pub struct NodeUri { /* private fields */ }Expand description
A portable address with a canonical Morphir URI spelling.
Implementations§
Source§impl NodeUri
impl NodeUri
Sourcepub fn new(
artifact: ArtifactSelector,
format: IrFormatVersion,
root: NodeRoot,
steps: Vec<NodeStep>,
revision: ArtifactRevision,
guard: Option<Sha256Digest>,
) -> Result<Self, NodeUriError>
pub fn new( artifact: ArtifactSelector, format: IrFormatVersion, root: NodeRoot, steps: Vec<NodeStep>, revision: ArtifactRevision, guard: Option<Sha256Digest>, ) -> Result<Self, NodeUriError>
Construct an address only if its canonical spelling parses back to the same typed value. This also checks the guard and name invariants.
pub fn artifact(&self) -> &ArtifactSelector
pub fn format(&self) -> IrFormatVersion
pub fn root(&self) -> &NodeRoot
pub fn steps(&self) -> &[NodeStep]
pub fn revision(&self) -> &ArtifactRevision
pub fn guard(&self) -> Option<&Sha256Digest>
Sourcepub fn parse(uri: &str) -> Result<Self, NodeUriError>
pub fn parse(uri: &str) -> Result<Self, NodeUriError>
Parse one canonical draft node URI, rejecting aliases and unknown roles.
Trait Implementations§
impl Eq for NodeUri
impl StructuralPartialEq for NodeUri
Auto Trait Implementations§
impl Freeze for NodeUri
impl RefUnwindSafe for NodeUri
impl Send for NodeUri
impl Sync for NodeUri
impl Unpin for NodeUri
impl UnsafeUnpin for NodeUri
impl UnwindSafe for NodeUri
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.