#[non_exhaustive]pub struct ListRootsResult {
pub roots: Vec<Root>,
pub meta: Option<MetaObject>,
}๐Deprecated since 2.0.0:
Roots is deprecated by SEP-2577 and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577
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.roots: Vec<Root>๐Deprecated since 2.0.0:
ยงRoots is deprecated by SEP-2577 and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577
meta: Option<MetaObject>๐Deprecated since 2.0.0:
Roots is deprecated by SEP-2577 and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577
Implementationsยง
Sourceยงimpl ListRootsResult
impl ListRootsResult
Sourcepub fn new(roots: Vec<Root>) -> ListRootsResult
pub fn new(roots: Vec<Root>) -> ListRootsResult
Creates a new ListRootsResult with the given roots.
Sourcepub fn with_meta(self, meta: MetaObject) -> ListRootsResult
pub fn with_meta(self, meta: MetaObject) -> ListRootsResult
Sets the protocol-level metadata for this result.
Trait Implementationsยง
Sourceยงimpl Clone for ListRootsResult
impl Clone for ListRootsResult
Sourceยงfn clone(&self) -> ListRootsResult
fn clone(&self) -> ListRootsResult
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 ListRootsResult
impl Debug for ListRootsResult
Sourceยงimpl Default for ListRootsResult
impl Default for ListRootsResult
Sourceยงfn default() -> ListRootsResult
fn default() -> ListRootsResult
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'de> Deserialize<'de> for ListRootsResult
impl<'de> Deserialize<'de> for ListRootsResult
Sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<ListRootsResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ListRootsResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl From<ListRootsResult> for ClientResult
impl From<ListRootsResult> for ClientResult
Sourceยงfn from(value: ListRootsResult) -> ClientResult
fn from(value: ListRootsResult) -> ClientResult
Converts to this type from the input type.
Sourceยงimpl JsonSchema for ListRootsResult
impl JsonSchema for ListRootsResult
Sourceยงfn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Sourceยงfn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Sourceยงfn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSourceยงimpl PartialEq for ListRootsResult
impl PartialEq for ListRootsResult
Sourceยงimpl Serialize for ListRootsResult
impl Serialize for ListRootsResult
Sourceยงfn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ListRootsResult
Auto Trait Implementationsยง
impl Freeze for ListRootsResult
impl RefUnwindSafe for ListRootsResult
impl Send for ListRootsResult
impl Sync for ListRootsResult
impl Unpin for ListRootsResult
impl UnsafeUnpin for ListRootsResult
impl UnwindSafe for ListRootsResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงfn in_current_span(self) -> Instrumented<Self> โ
fn in_current_span(self) -> Instrumented<Self> โ
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.