pub struct X402ValidateCheck {
pub actual: Option<String>,
pub check: X402ValidateCheckCheck,
pub detail: String,
pub expected: Option<String>,
pub passed: bool,
pub severity: X402ValidateCheckSeverity,
}Expand description
The result of a single preflight check performed against the x402 endpoint.
JSON schema
{
"description": "The result of a single preflight check performed against the x402 endpoint.",
"examples": [
{
"actual": "402",
"check": "returns_402",
"detail": "Endpoint responded with HTTP 402 Payment Required.",
"expected": "402",
"passed": true,
"severity": "required"
}
],
"type": "object",
"required": [
"check",
"detail",
"passed",
"severity"
],
"properties": {
"actual": {
"description": "The value the check observed, when applicable.",
"examples": [
"402"
],
"type": "string"
},
"check": {
"description": "The name of the preflight check. New values may be added in future versions; clients should handle unknown values gracefully.",
"examples": [
"returns_402"
],
"type": "string",
"enum": [
"reachable",
"returns_402",
"has_bazaar_extension",
"parse"
]
},
"detail": {
"description": "A human-readable explanation of the check result.",
"examples": [
"Endpoint responded with HTTP 402 Payment Required."
],
"type": "string"
},
"expected": {
"description": "The value the check expected, when applicable.",
"examples": [
"402"
],
"type": "string"
},
"passed": {
"description": "Whether the check passed.",
"examples": [
true
],
"type": "boolean"
},
"severity": {
"description": "Whether this check is a hard indexing requirement or a quality recommendation. A `required` check affects validity when it fails. An `advisory` check (for example, a missing output schema) is a suggestion to improve discoverability and does not make the endpoint invalid.",
"examples": [
"required"
],
"type": "string",
"enum": [
"required",
"advisory"
]
}
}
}Fields§
§actual: Option<String>The value the check observed, when applicable.
check: X402ValidateCheckCheckThe name of the preflight check. New values may be added in future versions; clients should handle unknown values gracefully.
detail: StringA human-readable explanation of the check result.
expected: Option<String>The value the check expected, when applicable.
passed: boolWhether the check passed.
severity: X402ValidateCheckSeverityWhether this check is a hard indexing requirement or a quality recommendation. A required check affects validity when it fails. An advisory check (for example, a missing output schema) is a suggestion to improve discoverability and does not make the endpoint invalid.
Implementations§
Source§impl X402ValidateCheck
impl X402ValidateCheck
pub fn builder() -> X402ValidateCheck
Trait Implementations§
Source§impl Clone for X402ValidateCheck
impl Clone for X402ValidateCheck
Source§impl Debug for X402ValidateCheck
impl Debug for X402ValidateCheck
Source§impl<'de> Deserialize<'de> for X402ValidateCheck
impl<'de> Deserialize<'de> for X402ValidateCheck
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<&X402ValidateCheck> for X402ValidateCheck
impl From<&X402ValidateCheck> for X402ValidateCheck
Source§fn from(value: &X402ValidateCheck) -> Self
fn from(value: &X402ValidateCheck) -> Self
Converts to this type from the input type.
Source§impl From<X402ValidateCheck> for X402ValidateCheck
impl From<X402ValidateCheck> for X402ValidateCheck
Source§fn from(value: X402ValidateCheck) -> Self
fn from(value: X402ValidateCheck) -> Self
Converts to this type from the input type.
Source§impl Serialize for X402ValidateCheck
impl Serialize for X402ValidateCheck
Source§impl TryFrom<X402ValidateCheck> for X402ValidateCheck
impl TryFrom<X402ValidateCheck> for X402ValidateCheck
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402ValidateCheck) -> Result<Self, ConversionError>
fn try_from(value: X402ValidateCheck) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402ValidateCheck
impl RefUnwindSafe for X402ValidateCheck
impl Send for X402ValidateCheck
impl Sync for X402ValidateCheck
impl Unpin for X402ValidateCheck
impl UnsafeUnpin for X402ValidateCheck
impl UnwindSafe for X402ValidateCheck
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