pub struct Root {
pub name: Option<String>,
pub uri: String,
}
Expand description
Represents a root directory or file that the server can operate on.
JSON schema
{
"description": "Represents a root directory or file that the server can operate on.",
"type": "object",
"required": [
"uri"
],
"properties": {
"name": {
"description": "An optional name for the root. This can be used to provide a human-readable\nidentifier for the root, which may be useful for display purposes or for\nreferencing the root in other parts of the application.",
"type": "string"
},
"uri": {
"description": "The URI identifying the root. This *must* start with file:// for now.\nThis restriction may be relaxed in future versions of the protocol to allow\nother URI schemes.",
"type": "string",
"format": "uri"
}
}
}
Fields§
§name: Option<String>
An optional name for the root. This can be used to provide a human-readable identifier for the root, which may be useful for display purposes or for referencing the root in other parts of the application.
uri: String
The URI identifying the root. This must start with file:// for now. This restriction may be relaxed in future versions of the protocol to allow other URI schemes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Root
impl<'de> Deserialize<'de> for Root
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 Root
impl RefUnwindSafe for Root
impl Send for Root
impl Sync for Root
impl Unpin for Root
impl UnwindSafe for Root
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