pub struct ListRootsRequest {
pub params: Option<ListRootsRequestParams>,
/* private fields */
}
Expand description
Sent from the server to request a list of root URIs from the client. Roots allow servers to ask for specific directories or files to operate on. A common example for roots is providing a set of repositories or directories a server should operate on. This request is typically used when the server needs to understand the file system structure or access specific locations that the client has permission to read from.
JSON schema
{
"description": "Sent from the server to request a list of root URIs from the client. Roots allow\nservers to ask for specific directories or files to operate on. A common example\nfor roots is providing a set of repositories or directories a server should operate\non.\n\nThis request is typically used when the server needs to understand the file system\nstructure or access specific locations that the client has permission to read from.",
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"const": "roots/list"
},
"params": {
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"progressToken": {
"description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
"$ref": "#/definitions/ProgressToken"
}
}
}
},
"additionalProperties": {}
}
}
}
Fields§
§params: Option<ListRootsRequestParams>
Implementations§
Source§impl ListRootsRequest
impl ListRootsRequest
pub fn new(params: Option<ListRootsRequestParams>) -> Self
pub fn method(&self) -> &String
pub fn method_name() -> String
Trait Implementations§
Source§impl Clone for ListRootsRequest
impl Clone for ListRootsRequest
Source§fn clone(&self) -> ListRootsRequest
fn clone(&self) -> ListRootsRequest
Returns a copy 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 ListRootsRequest
impl Debug for ListRootsRequest
Source§impl<'de> Deserialize<'de> for ListRootsRequest
impl<'de> Deserialize<'de> for ListRootsRequest
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<ListRootsRequest> for MessageFromServer
impl From<ListRootsRequest> for MessageFromServer
Source§fn from(value: ListRootsRequest) -> Self
fn from(value: ListRootsRequest) -> Self
Converts to this type from the input type.
Source§impl From<ListRootsRequest> for RequestFromServer
impl From<ListRootsRequest> for RequestFromServer
Source§fn from(value: ListRootsRequest) -> Self
fn from(value: ListRootsRequest) -> Self
Converts to this type from the input type.
Source§impl From<ListRootsRequest> for ServerRequest
impl From<ListRootsRequest> for ServerRequest
Source§fn from(value: ListRootsRequest) -> Self
fn from(value: ListRootsRequest) -> Self
Converts to this type from the input type.
Source§impl FromMessage<ListRootsRequest> for ServerMessage
impl FromMessage<ListRootsRequest> for ServerMessage
fn from_message( message: ListRootsRequest, request_id: Option<RequestId>, ) -> Result<Self, JsonrpcErrorError>
Source§impl Serialize for ListRootsRequest
impl Serialize for ListRootsRequest
Source§impl ToMessage<ServerMessage> for ListRootsRequest
impl ToMessage<ServerMessage> for ListRootsRequest
fn to_message( self, request_id: Option<RequestId>, ) -> Result<ServerMessage, JsonrpcErrorError>
Source§impl TryFrom<RequestFromServer> for ListRootsRequest
impl TryFrom<RequestFromServer> for ListRootsRequest
Source§type Error = JsonrpcErrorError
type Error = JsonrpcErrorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ListRootsRequest
impl RefUnwindSafe for ListRootsRequest
impl Send for ListRootsRequest
impl Sync for ListRootsRequest
impl Unpin for ListRootsRequest
impl UnwindSafe for ListRootsRequest
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