pub struct Runtime { /* private fields */ }Expand description
Runtime allows for the execution of programs. Instantiate with Runtime::new().
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn evaluate(
&mut self,
program: &[u8],
signature_request: &SignatureRequest,
config: Option<&[u8]>,
oracle_data: Option<&[Vec<u8>]>,
) -> Result<(), RuntimeError>
pub fn evaluate( &mut self, program: &[u8], signature_request: &SignatureRequest, config: Option<&[u8]>, oracle_data: Option<&[Vec<u8>]>, ) -> Result<(), RuntimeError>
Evaluate a program with a given initial state.
Sourcepub fn custom_hash(
&mut self,
program: &[u8],
message: &[u8],
) -> Result<[u8; 32], RuntimeError>
pub fn custom_hash( &mut self, program: &[u8], message: &[u8], ) -> Result<[u8; 32], RuntimeError>
Compute the custom-hash of a message from the program.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl !UnwindSafe for Runtime
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more