pub struct ListResourcesRequest {
pub id: RequestId,
pub params: Option<PaginatedRequestParams>,
/* private fields */
}Expand description
Sent from the client to request a list of resources the server has.
JSON schema
{
"description": "Sent from the client to request a list of resources the server has.",
"type": "object",
"required": [
"id",
"jsonrpc",
"method"
],
"properties": {
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "resources/list"
},
"params": {
"$ref": "#/$defs/PaginatedRequestParams"
}
}
}Fields§
§id: RequestId§params: Option<PaginatedRequestParams>Implementations§
Source§impl ListResourcesRequest
impl ListResourcesRequest
pub fn new(id: RequestId, params: Option<PaginatedRequestParams>) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “resources/list”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0: Use
method_value() instead.Trait Implementations§
Source§impl Clone for ListResourcesRequest
impl Clone for ListResourcesRequest
Source§fn clone(&self) -> ListResourcesRequest
fn clone(&self) -> ListResourcesRequest
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 ListResourcesRequest
impl Debug for ListResourcesRequest
Source§impl<'de> Deserialize<'de> for ListResourcesRequest
impl<'de> Deserialize<'de> for ListResourcesRequest
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<ListResourcesRequest> for ClientRequest
impl From<ListResourcesRequest> for ClientRequest
Source§fn from(value: ListResourcesRequest) -> Self
fn from(value: ListResourcesRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ListResourcesRequest
impl RefUnwindSafe for ListResourcesRequest
impl Send for ListResourcesRequest
impl Sync for ListResourcesRequest
impl Unpin for ListResourcesRequest
impl UnwindSafe for ListResourcesRequest
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