pub struct PaymentRequired {
pub accepts: Vec<PaymentRequirements>,
pub error: Option<String>,
pub extensions: Option<Map<String, Value>>,
pub resource: PaymentRequiredResource,
pub x402_version: PaymentRequiredX402Version,
}Expand description
PaymentRequired
JSON schema
{
"type": "object",
"required": [
"accepts",
"resource",
"x402Version"
],
"properties": {
"accepts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentRequirements"
},
"minItems": 1
},
"error": {
"type": "string"
},
"extensions": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"resource": {
"type": "object",
"required": [
"url"
],
"properties": {
"description": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
}
},
"x402Version": {
"type": "integer",
"enum": [
2
]
}
}
}Fields§
§accepts: Vec<PaymentRequirements>§error: Option<String>§extensions: Option<Map<String, Value>>§resource: PaymentRequiredResource§x402_version: PaymentRequiredX402VersionImplementations§
Source§impl PaymentRequired
impl PaymentRequired
pub fn builder() -> PaymentRequired
Trait Implementations§
Source§impl Clone for PaymentRequired
impl Clone for PaymentRequired
Source§fn clone(&self) -> PaymentRequired
fn clone(&self) -> PaymentRequired
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 PaymentRequired
impl Debug for PaymentRequired
Source§impl<'de> Deserialize<'de> for PaymentRequired
impl<'de> Deserialize<'de> for PaymentRequired
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
Source§impl From<PaymentRequired> for PrepareResponse
impl From<PaymentRequired> for PrepareResponse
Source§fn from(value: PaymentRequired) -> Self
fn from(value: PaymentRequired) -> Self
Converts to this type from the input type.
Source§impl From<PaymentRequired> for PaymentRequired
impl From<PaymentRequired> for PaymentRequired
Source§fn from(value: PaymentRequired) -> Self
fn from(value: PaymentRequired) -> Self
Converts to this type from the input type.
Source§impl Serialize for PaymentRequired
impl Serialize for PaymentRequired
Source§impl TryFrom<PaymentRequired> for PaymentRequired
impl TryFrom<PaymentRequired> for PaymentRequired
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PaymentRequired) -> Result<Self, ConversionError>
fn try_from(value: PaymentRequired) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PaymentRequired
impl RefUnwindSafe for PaymentRequired
impl Send for PaymentRequired
impl Sync for PaymentRequired
impl Unpin for PaymentRequired
impl UnsafeUnpin for PaymentRequired
impl UnwindSafe for PaymentRequired
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