pub struct ListResourcesResult {
pub result_type: Option<ResultType>,
pub meta: Option<MetaObject>,
pub next_cursor: Option<Cursor>,
pub ttl_ms: Option<u64>,
pub cache_scope: Option<CacheScope>,
pub resources: Vec<Resource>,
}Fields§
§result_type: Option<ResultType>Result type discriminator (SEP-2322). Required by the spec schema
for servers implementing protocol version 2026-07-28, but optional
here because this type also models results from older protocol
versions, which do not carry the field: None means absent on the
wire, and per the spec “the client MUST treat the absent field as
"complete"”. Constructors default to Some(ResultType::COMPLETE);
the server handler clears the field when responding to peers that
negotiated an older version.
meta: Option<MetaObject>§next_cursor: Option<Cursor>§ttl_ms: Option<u64>Time, in milliseconds, that this result may be treated as fresh (SEP-2549). Required by spec version 2026-07-28, but optional here to maintain compatibility with older spec versions.
cache_scope: Option<CacheScope>Scope describing who may cache this result (SEP-2549). Required by spec version 2026-07-28, but optional here to maintain compatibility with older spec versions.
resources: Vec<Resource>Implementations§
Source§impl ListResourcesResult
impl ListResourcesResult
pub fn with_all_items(items: Vec<Resource>) -> Self
Sourcepub fn with_ttl_ms(self, ttl_ms: u64) -> Self
pub fn with_ttl_ms(self, ttl_ms: u64) -> Self
Set the time, in milliseconds, that this result may be treated as fresh.
Sourcepub fn with_cache_scope(self, cache_scope: CacheScope) -> Self
pub fn with_cache_scope(self, cache_scope: CacheScope) -> Self
Set the cache scope for this result.
Trait Implementations§
Source§impl Clone for ListResourcesResult
impl Clone for ListResourcesResult
Source§impl Debug for ListResourcesResult
impl Debug for ListResourcesResult
Source§impl Default for ListResourcesResult
impl Default for ListResourcesResult
Source§impl<'de> Deserialize<'de> for ListResourcesResult
impl<'de> Deserialize<'de> for ListResourcesResult
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>,
Source§impl From<ListResourcesResult> for ServerResult
impl From<ListResourcesResult> for ServerResult
Source§fn from(value: ListResourcesResult) -> Self
fn from(value: ListResourcesResult) -> Self
Source§impl JsonSchema for ListResourcesResult
Available on crate feature schemars only.
impl JsonSchema for ListResourcesResult
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more