[][src]Struct koto_bytecode::Chunk

pub struct Chunk {
    pub bytes: Vec<u8>,
    pub constants: ConstantPool,
    pub string_constants_arc: Arc<str>,
    pub source_path: Option<PathBuf>,
    pub debug_info: DebugInfo,
}

A compiled chunk of bytecode, along with its associated constants and metadata

Fields

bytes: Vec<u8>

The bytes representing the chunk's bytecode

constants: ConstantPool

The constant data associated with the chunk's bytecode

string_constants_arc: Arc<str>

The constant string data associated with the chunk's bytecode

source_path: Option<PathBuf>

The path of the program's source file

debug_info: DebugInfo

Debug information associated with the chunk's bytecode

Implementations

impl Chunk[src]

pub fn new(
    bytes: Vec<u8>,
    constants: ConstantPool,
    source_path: Option<PathBuf>,
    debug_info: DebugInfo
) -> Self
[src]

Trait Implementations

impl Clone for Chunk[src]

impl Debug for Chunk[src]

impl Default for Chunk[src]

impl PartialEq<Chunk> for Chunk[src]

impl StructuralPartialEq for Chunk[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.