pub struct SchemeRegistry(/* private fields */);Expand description
Registry of active scheme handlers.
Maps chain+scheme combinations to their handlers. Built from blueprints and chain providers based on configuration.
Implementations§
Source§impl SchemeRegistry
impl SchemeRegistry
Sourcepub fn build<P: ChainProviderOps>(
chains: ChainRegistry<P>,
blueprints: SchemeBlueprints<P>,
config: &Vec<SchemeConfig>,
) -> Self
pub fn build<P: ChainProviderOps>( chains: ChainRegistry<P>, blueprints: SchemeBlueprints<P>, config: &Vec<SchemeConfig>, ) -> Self
Builds a scheme registry from blueprints and configuration.
For each enabled scheme in the config, this finds the matching blueprint and chain provider, then builds a handler.
Sourcepub fn by_slug(
&self,
slug: &SchemeHandlerSlug,
) -> Option<&dyn X402SchemeFacilitator>
pub fn by_slug( &self, slug: &SchemeHandlerSlug, ) -> Option<&dyn X402SchemeFacilitator>
Gets a handler by its slug.
Sourcepub fn values(&self) -> impl Iterator<Item = &dyn X402SchemeFacilitator>
pub fn values(&self) -> impl Iterator<Item = &dyn X402SchemeFacilitator>
Returns an iterator over all registered handlers.
Trait Implementations§
Source§impl Debug for SchemeRegistry
impl Debug for SchemeRegistry
Source§impl Default for SchemeRegistry
impl Default for SchemeRegistry
Source§fn default() -> SchemeRegistry
fn default() -> SchemeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SchemeRegistry
impl !UnwindSafe for SchemeRegistry
impl Freeze for SchemeRegistry
impl Send for SchemeRegistry
impl Sync for SchemeRegistry
impl Unpin for SchemeRegistry
impl UnsafeUnpin for SchemeRegistry
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