pub trait ErrorSignatureRegistry: Send + Sync {
// Required methods
fn get_by_selector(&self, selector: [u8; 4]) -> Vec<ErrorSignature>;
fn get_by_name(&self, name: &str) -> Option<ErrorSignature>;
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Trait for looking up error signatures by 4-byte selector.
Required Methods§
Sourcefn get_by_selector(&self, selector: [u8; 4]) -> Vec<ErrorSignature>
fn get_by_selector(&self, selector: [u8; 4]) -> Vec<ErrorSignature>
Look up all known signatures matching a 4-byte selector. Returns multiple signatures when there are collisions.
Sourcefn get_by_name(&self, name: &str) -> Option<ErrorSignature>
fn get_by_name(&self, name: &str) -> Option<ErrorSignature>
Look up a signature by full name (e.g. "InsufficientBalance").