pub struct ValidationState<R> { /* private fields */ }
Expand description
| Template for capturing information | about block/transaction validation. | This is instantiated by TxValidationState | and BlockValidationState for validation | information on transactions and blocks | respectively. |
Implementations§
Source§impl<R> ValidationState<R>
impl<R> ValidationState<R>
pub fn invalid( &mut self, result: R, reject_reason: Option<&str>, debug_message: Option<&str>, ) -> bool
pub fn error(&mut self, reject_reason: &String) -> bool
pub fn is_valid(&self) -> bool
pub fn is_invalid(&self) -> bool
pub fn is_error(&self) -> bool
pub fn get_result(&self) -> R
pub fn get_reject_reason(&self) -> String
pub fn get_debug_message(&self) -> String
pub fn to_string(&self) -> String
Trait Implementations§
Source§impl<R: Default> Default for ValidationState<R>
impl<R: Default> Default for ValidationState<R>
Source§fn default() -> ValidationState<R>
fn default() -> ValidationState<R>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<R> Freeze for ValidationState<R>where
R: Freeze,
impl<R> RefUnwindSafe for ValidationState<R>where
R: RefUnwindSafe,
impl<R> Send for ValidationState<R>where
R: Send,
impl<R> Sync for ValidationState<R>where
R: Sync,
impl<R> Unpin for ValidationState<R>where
R: Unpin,
impl<R> UnwindSafe for ValidationState<R>where
R: UnwindSafe,
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