pub struct ListRootsRequest {
pub id: RequestId,
pub params: Option<RequestParams>,
/* 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": [
"id",
"jsonrpc",
"method"
],
"properties": {
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "roots/list"
},
"params": {
"$ref": "#/$defs/RequestParams"
}
}
}Fields§
§id: RequestId§params: Option<RequestParams>Implementations§
Source§impl ListRootsRequest
impl ListRootsRequest
pub fn new(id: RequestId, params: Option<RequestParams>) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “roots/list”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0: Use
method_value() instead.Trait Implementations§
Source§impl Clone for ListRootsRequest
impl Clone for ListRootsRequest
Source§fn clone(&self) -> ListRootsRequest
fn clone(&self) -> ListRootsRequest
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 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 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.
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