pub struct ContractContainer {
pub panic_message: bool,
/* private fields */
}Expand description
Contains a reference to a contract implementation.
It can optionally also contain an allowed endpoint whitelist, to simulate multi-contract.
Fields§
§panic_message: boolImplementations§
Source§impl ContractContainer
impl ContractContainer
pub fn new( callable: Box<dyn CallableContract>, function_whitelist: Option<Vec<String>>, panic_message: bool, ) -> Self
pub fn validate_function_name(&self, function_name: &TxFunctionName) -> bool
pub fn call(&self, function_name: &TxFunctionName) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContractContainer
impl !RefUnwindSafe for ContractContainer
impl Send for ContractContainer
impl Sync for ContractContainer
impl Unpin for ContractContainer
impl UnsafeUnpin for ContractContainer
impl !UnwindSafe for ContractContainer
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> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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