pub struct SeedNode {
pub kind: NodeKind,
pub materializer_id: u16,
pub materializer_version: u16,
pub logical_output_len: u64,
pub params: Vec<u8>,
pub deps: Vec<NodeId>,
pub provenance: String,
pub limits: NodeLimits,
}Expand description
One canonical procedural seed node.
Fields§
§kind: NodeKindComputation kind.
materializer_id: u16Materializer registry id (the kind value for v1).
materializer_version: u16Materializer semantics version.
logical_output_len: u64Declared logical output length (a bound, checked on materialization).
params: Vec<u8>Kind-specific canonical parameters.
deps: Vec<NodeId>Canonical dependency ids actually read (the dynamic read set).
provenance: StringShort provenance/basis string (adapter-supplied, advisory).
limits: NodeLimitsResource envelope.
Implementations§
Source§impl SeedNode
impl SeedNode
Sourcepub fn new(
kind: NodeKind,
logical_output_len: u64,
params: Vec<u8>,
deps: Vec<NodeId>,
provenance: impl Into<String>,
) -> Self
pub fn new( kind: NodeKind, logical_output_len: u64, params: Vec<u8>, deps: Vec<NodeId>, provenance: impl Into<String>, ) -> Self
Construct a node with the current materializer version.
Sourcepub fn encode_canonical(&self) -> Vec<u8> ⓘ
pub fn encode_canonical(&self) -> Vec<u8> ⓘ
Canonically encode this node. The encoding never includes the node id.
Sourcepub fn decode_canonical(bytes: &[u8]) -> Result<SeedNode>
pub fn decode_canonical(bytes: &[u8]) -> Result<SeedNode>
Parse a canonical node, enforcing structural bounds.
Sourcepub fn content_id(&self) -> NodeId
pub fn content_id(&self) -> NodeId
The content id of this node’s canonical encoding.
Trait Implementations§
impl Eq for SeedNode
impl StructuralPartialEq for SeedNode
Auto Trait Implementations§
impl Freeze for SeedNode
impl RefUnwindSafe for SeedNode
impl Send for SeedNode
impl Sync for SeedNode
impl Unpin for SeedNode
impl UnsafeUnpin for SeedNode
impl UnwindSafe for SeedNode
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