Trait solana_sdk::sanitize::Sanitize

source ·
pub trait Sanitize {
    // Provided method
    fn sanitize(&self) -> Result<(), SanitizeError> { ... }
}
Expand description

A trait for sanitizing values and members of over-the-wire messages.

Implementation should recursively descend through the data structure and sanitize all struct members and enum clauses. Sanitize excludes signature- verification checks, those are handled by another pass. Sanitize checks should include but are not limited to:

  • All index values are in range.
  • All values are within their static max/min bounds.

Provided Methods§

Implementations on Foreign Types§

source§

impl<T> Sanitize for Vec<T>
where T: Sanitize,

Implementors§

source§

impl Sanitize for solana_sdk::blake3::Hash

source§

impl Sanitize for solana_sdk::hash::Hash

source§

impl Sanitize for CompiledInstruction

source§

impl Sanitize for solana_sdk::keccak::Hash

source§

impl Sanitize for Message

source§

impl Sanitize for Pubkey

source§

impl Sanitize for Signature

source§

impl Sanitize for Transaction