#[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.
extensions is a JSON array of extension identifiers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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 with_kinds(self, kinds: Vec<SupportedPaymentKind>) -> Self
pub fn with_kinds(self, kinds: Vec<SupportedPaymentKind>) -> Self
Replaces the kinds list.
Sourcepub fn with_extensions(self, extensions: Vec<CompactString>) -> Self
pub fn with_extensions(self, extensions: Vec<CompactString>) -> Self
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
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>
Signer addresses matching the given chain (exact and namespace:*).
Trait Implementations§
Source§impl Clone for SupportedResponse
impl Clone for SupportedResponse
Source§fn clone(&self) -> SupportedResponse
fn clone(&self) -> SupportedResponse
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 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
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more