pub struct X402ResourceInfo {
pub description: Option<String>,
pub mime_type: Option<String>,
pub url: Option<String>,
}Expand description
Describes the resource being accessed in x402 protocol.
JSON schema
{
"description": "Describes the resource being accessed in x402 protocol.",
"type": "object",
"properties": {
"description": {
"description": "The description of the resource.",
"examples": [
"Premium API access for data analysis"
],
"type": "string"
},
"mimeType": {
"description": "The MIME type of the resource response.",
"examples": [
"application/json"
],
"type": "string"
},
"url": {
"description": "The URL of the resource.",
"examples": [
"https://api.example.com/premium/resource/123"
],
"type": "string"
}
}
}Fields§
§description: Option<String>The description of the resource.
mime_type: Option<String>The MIME type of the resource response.
url: Option<String>The URL of the resource.
Implementations§
Source§impl X402ResourceInfo
impl X402ResourceInfo
pub fn builder() -> X402ResourceInfo
Trait Implementations§
Source§impl Clone for X402ResourceInfo
impl Clone for X402ResourceInfo
Source§fn clone(&self) -> X402ResourceInfo
fn clone(&self) -> X402ResourceInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 X402ResourceInfo
impl Debug for X402ResourceInfo
Source§impl Default for X402ResourceInfo
impl Default for X402ResourceInfo
Source§impl<'de> Deserialize<'de> for X402ResourceInfo
impl<'de> Deserialize<'de> for X402ResourceInfo
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<&X402ResourceInfo> for X402ResourceInfo
impl From<&X402ResourceInfo> for X402ResourceInfo
Source§fn from(value: &X402ResourceInfo) -> Self
fn from(value: &X402ResourceInfo) -> Self
Converts to this type from the input type.
Source§impl From<X402ResourceInfo> for X402ResourceInfo
impl From<X402ResourceInfo> for X402ResourceInfo
Source§fn from(value: X402ResourceInfo) -> Self
fn from(value: X402ResourceInfo) -> Self
Converts to this type from the input type.
Source§impl Serialize for X402ResourceInfo
impl Serialize for X402ResourceInfo
Source§impl TryFrom<X402ResourceInfo> for X402ResourceInfo
impl TryFrom<X402ResourceInfo> for X402ResourceInfo
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402ResourceInfo) -> Result<Self, ConversionError>
fn try_from(value: X402ResourceInfo) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402ResourceInfo
impl RefUnwindSafe for X402ResourceInfo
impl Send for X402ResourceInfo
impl Sync for X402ResourceInfo
impl Unpin for X402ResourceInfo
impl UnwindSafe for X402ResourceInfo
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