Struct miden_processor::Kernel
source · pub struct Kernel(_);
Expand description
A list of procedure hashes defining a VM kernel.
The internally-stored list always has a consistent order, regardless of the order of procedure list used to instantiate a kernel.
Implementations§
source§impl Kernel
impl Kernel
sourcepub fn new(proc_hashes: &[RpoDigest]) -> Kernel
pub fn new(proc_hashes: &[RpoDigest]) -> Kernel
Returns a new Kernel instantiated with the specified procedure hashes.
sourcepub fn contains_proc(&self, proc_hash: RpoDigest) -> bool
pub fn contains_proc(&self, proc_hash: RpoDigest) -> bool
Returns true if a procedure with the specified hash belongs to this kernel.
sourcepub fn proc_hashes(&self) -> &[RpoDigest]
pub fn proc_hashes(&self) -> &[RpoDigest]
Returns a list of procedure hashes contained in this kernel.
Trait Implementations§
source§impl Deserializable for Kernel
impl Deserializable for Kernel
source§fn read_from<R>(source: &mut R) -> Result<Kernel, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<Kernel, DeserializationError>where R: ByteReader,
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into Self
, and returns the result. Read more§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
§fn read_batch_from<R>(
source: &mut R,
num_elements: usize
) -> Result<Vec<Self, Global>, DeserializationError>where
R: ByteReader,
fn read_batch_from<R>( source: &mut R, num_elements: usize ) -> Result<Vec<Self, Global>, DeserializationError>where R: ByteReader,
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into a vector with the specified number of Self
elements, and returns the result. Read moresource§impl PartialEq<Kernel> for Kernel
impl PartialEq<Kernel> for Kernel
source§impl Serializable for Kernel
impl Serializable for Kernel
source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where W: ByteWriter,
Serializes
self
into bytes and writes these bytes into the target
.§fn write_batch_into<W>(source: &[Self], target: &mut W)where
W: ByteWriter,
fn write_batch_into<W>(source: &[Self], target: &mut W)where W: ByteWriter,
§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more