Enum miden_assembly::ast::Node
source · pub enum Node {
Instruction(Instruction),
IfElse {
true_case: CodeBody,
false_case: CodeBody,
},
Repeat {
times: u32,
body: CodeBody,
},
While {
body: CodeBody,
},
}Expand description
A node in a AST which can represent either a single instruction or a body of a control flow expression.
Variants§
Trait Implementations§
source§impl Deserializable for Node
impl Deserializable for Node
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source, attempts to deserialize these bytes
into Self, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl FromIterator<Node> for CodeBody
impl FromIterator<Node> for CodeBody
source§impl PartialEq for Node
impl PartialEq for Node
source§impl Serializable for Node
impl Serializable for Node
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self into bytes and writes these bytes into the target.source§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
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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