pub struct CodeAndId { /* private fields */ }
Expand description
The newtype contains the Code instance and the corresponding id (hash).
Implementations§
source§impl CodeAndId
impl CodeAndId
sourcepub fn new(code: Code) -> Self
pub fn new(code: Code) -> Self
Calculates the id (hash) of the raw binary code and creates new instance.
sourcepub fn from_parts_unchecked(code: Code, code_id: CodeId) -> Self
pub fn from_parts_unchecked(code: Code, code_id: CodeId) -> Self
Creates the instance from the precalculated hash without checks.
sourcepub fn into_parts(self) -> (Code, CodeId)
pub fn into_parts(self) -> (Code, CodeId)
Decomposes this instance.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CodeAndId
impl Send for CodeAndId
impl Sync for CodeAndId
impl Unpin for CodeAndId
impl UnwindSafe for CodeAndId
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