pub struct ContractValidator { /* private fields */ }Expand description
Runtime contract validation
Implementations§
Source§impl ContractValidator
impl ContractValidator
pub fn new() -> Self
pub fn add_contract(&mut self, name: String, _contract: Box<dyn Any>)
pub fn validate_call<T>( &self, api_name: &str, _input: T, ) -> Result<(), ContractError>
pub fn enable_validation(&mut self)
pub fn disable_validation(&mut self)
Trait Implementations§
Source§impl Clone for ContractValidator
impl Clone for ContractValidator
Source§fn clone(&self) -> ContractValidator
fn clone(&self) -> ContractValidator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContractValidator
impl Debug for ContractValidator
Auto Trait Implementations§
impl Freeze for ContractValidator
impl RefUnwindSafe for ContractValidator
impl Send for ContractValidator
impl Sync for ContractValidator
impl Unpin for ContractValidator
impl UnwindSafe for ContractValidator
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