#[non_exhaustive]pub struct ListResourcesResult {
pub resources: Vec<ResourceInfo>,
pub next_cursor: Cursor,
}Expand description
List resources response.
§Backward Compatibility
This struct is #[non_exhaustive]. Use the constructor to remain
forward-compatible:
use pmcp::types::ListResourcesResult;
let result = ListResourcesResult::new(vec![]);Within the same crate, struct literal syntax with ..Default::default() also works.
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.resources: Vec<ResourceInfo>Available resources
next_cursor: CursorPagination cursor
Implementations§
Source§impl ListResourcesResult
impl ListResourcesResult
Sourcepub fn new(resources: Vec<ResourceInfo>) -> Self
pub fn new(resources: Vec<ResourceInfo>) -> Self
Create a new list resources result.
Sourcepub fn with_next_cursor(self, cursor: impl Into<String>) -> Self
pub fn with_next_cursor(self, cursor: impl Into<String>) -> Self
Set the pagination cursor for the next page.
Trait Implementations§
Source§impl Clone for ListResourcesResult
impl Clone for ListResourcesResult
Source§fn clone(&self) -> ListResourcesResult
fn clone(&self) -> ListResourcesResult
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 ListResourcesResult
impl Debug for ListResourcesResult
Source§impl Default for ListResourcesResult
impl Default for ListResourcesResult
Source§fn default() -> ListResourcesResult
fn default() -> ListResourcesResult
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ListResourcesResult
impl RefUnwindSafe for ListResourcesResult
impl Send for ListResourcesResult
impl Sync for ListResourcesResult
impl Unpin for ListResourcesResult
impl UnsafeUnpin for ListResourcesResult
impl UnwindSafe for ListResourcesResult
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