pub struct ChainRegistry { /* private fields */ }Expand description
Registry of all supported chains and their analyzers.
Implementations§
Source§impl ChainRegistry
impl ChainRegistry
Sourcepub fn list_chains(&self) -> Result<Vec<ChainInfo>, ForgeGuardError>
pub fn list_chains(&self) -> Result<Vec<ChainInfo>, ForgeGuardError>
List all registered chains.
Sourcepub fn register_chain(&mut self, info: ChainInfo)
pub fn register_chain(&mut self, info: ChainInfo)
Register a custom chain.
Sourcepub fn evm_chains(&self) -> Vec<&ChainInfo>
pub fn evm_chains(&self) -> Vec<&ChainInfo>
Get all EVM-compatible chains.
Sourcepub fn get_by_chain_id(&self, chain_id: u64) -> Option<&ChainInfo>
pub fn get_by_chain_id(&self, chain_id: u64) -> Option<&ChainInfo>
Get a chain by its numeric chain ID.
Trait Implementations§
Source§impl Clone for ChainRegistry
impl Clone for ChainRegistry
Source§fn clone(&self) -> ChainRegistry
fn clone(&self) -> ChainRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChainRegistry
impl RefUnwindSafe for ChainRegistry
impl Send for ChainRegistry
impl Sync for ChainRegistry
impl Unpin for ChainRegistry
impl UnsafeUnpin for ChainRegistry
impl UnwindSafe for ChainRegistry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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