pub struct ProjectionIdentity { /* private fields */ }Expand description
The exact lineage, projection declaration, and semantic plan identity.
Implementations§
Source§impl ProjectionIdentity
impl ProjectionIdentity
Sourcepub const fn new(
contract_lineage: ContractLineage,
projection_id: ProjectionId,
plan_hash: ProjectionPlanHash,
) -> Self
pub const fn new( contract_lineage: ContractLineage, projection_id: ProjectionId, plan_hash: ProjectionPlanHash, ) -> Self
Creates an identity from already-validated foundational components.
Sourcepub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ProjectionKeyError>
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self, ProjectionKeyError>
Decodes one complete canonical v1 projection-identity payload.
Sourcepub const fn contract_lineage(&self) -> &ContractLineage
pub const fn contract_lineage(&self) -> &ContractLineage
Returns the exact contract lineage.
Sourcepub const fn projection_id(&self) -> ProjectionId
pub const fn projection_id(&self) -> ProjectionId
Returns the stable nonzero projection ID.
Sourcepub const fn plan_hash(&self) -> ProjectionPlanHash
pub const fn plan_hash(&self) -> ProjectionPlanHash
Returns the exact projection-plan hash.
Sourcepub fn to_canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_bytes(&self) -> Vec<u8> ⓘ
Encodes the canonical v1 projection-identity payload.
Trait Implementations§
Source§impl Clone for ProjectionIdentity
impl Clone for ProjectionIdentity
Source§impl Debug for ProjectionIdentity
impl Debug for ProjectionIdentity
impl Eq for ProjectionIdentity
Source§impl Hash for ProjectionIdentity
impl Hash for ProjectionIdentity
Source§impl Ord for ProjectionIdentity
impl Ord for ProjectionIdentity
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 ProjectionIdentity
impl PartialEq for ProjectionIdentity
Source§impl PartialOrd for ProjectionIdentity
impl PartialOrd for ProjectionIdentity
impl StructuralPartialEq for ProjectionIdentity
Auto Trait Implementations§
impl Freeze for ProjectionIdentity
impl RefUnwindSafe for ProjectionIdentity
impl Send for ProjectionIdentity
impl Sync for ProjectionIdentity
impl Unpin for ProjectionIdentity
impl UnsafeUnpin for ProjectionIdentity
impl UnwindSafe for ProjectionIdentity
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