#[non_exhaustive]pub struct SupportedResponse {
pub kinds: Vec<SupportedPaymentKind>,
pub extensions: Vec<CompactString>,
pub signers: HashMap<CompactString, Vec<CompactString>>,
}Expand description
Response body of a facilitator’s /supported endpoint.
Describes the full set of capabilities: payment kinds, known extensions, and signer addresses keyed by CAIP-2 chain pattern.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kinds: Vec<SupportedPaymentKind>Supported payment kinds. Invalid entries are silently skipped.
extensions: Vec<CompactString>Supported extension identifiers.
signers: HashMap<CompactString, Vec<CompactString>>Signer addresses indexed by CAIP-2 pattern
("eip155:8453", "solana:*", …).
Implementations§
Source§impl SupportedResponse
impl SupportedResponse
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs an empty response. Equivalent to Default::default but
recommended for explicit construction sites where the field set will
grow over time.
Sourcepub fn with_kinds(self, kinds: Vec<SupportedPaymentKind>) -> Self
pub fn with_kinds(self, kinds: Vec<SupportedPaymentKind>) -> Self
Builder: replaces the kinds list.
Sourcepub fn with_extensions(self, extensions: Vec<CompactString>) -> Self
pub fn with_extensions(self, extensions: Vec<CompactString>) -> Self
Builder: replaces the extensions identifier list.
Sourcepub fn with_signers(
self,
signers: HashMap<CompactString, Vec<CompactString>>,
) -> Self
pub fn with_signers( self, signers: HashMap<CompactString, Vec<CompactString>>, ) -> Self
Builder: replaces the per-pattern signer map.
Sourcepub fn signers_for_chain(&self, chain_id: &ChainId) -> Vec<&str>
pub fn signers_for_chain(&self, chain_id: &ChainId) -> Vec<&str>
Returns all signer addresses that match the given chain.
Matches both the exact pattern ("eip155:8453") and the namespace
wildcard ("eip155:*").
Trait Implementations§
Source§impl Clone for SupportedResponse
impl Clone for SupportedResponse
Source§fn clone(&self) -> SupportedResponse
fn clone(&self) -> SupportedResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SupportedResponse
impl Debug for SupportedResponse
Source§impl Default for SupportedResponse
impl Default for SupportedResponse
Source§fn default() -> SupportedResponse
fn default() -> SupportedResponse
Source§impl<'de> Deserialize<'de> for SupportedResponse
impl<'de> Deserialize<'de> for SupportedResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SupportedResponse
Source§impl PartialEq for SupportedResponse
impl PartialEq for SupportedResponse
Source§impl Serialize for SupportedResponse
impl Serialize for SupportedResponse
impl StructuralPartialEq for SupportedResponse
Auto Trait Implementations§
impl Freeze for SupportedResponse
impl RefUnwindSafe for SupportedResponse
impl Send for SupportedResponse
impl Sync for SupportedResponse
impl Unpin for SupportedResponse
impl UnsafeUnpin for SupportedResponse
impl UnwindSafe for SupportedResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.