Struct distant_core::LspContent
source · pub struct LspContent(_);
Expand description
Represents the content for LSP data
Implementations§
source§impl LspContent
impl LspContent
sourcepub fn convert_local_scheme_to_distant(&mut self)
pub fn convert_local_scheme_to_distant(&mut self)
Converts all URIs with file
as the scheme to distant
instead
sourcepub fn convert_local_scheme_to(&mut self, scheme: &str)
pub fn convert_local_scheme_to(&mut self, scheme: &str)
Converts all URIs with file
as the scheme to scheme
instead
sourcepub fn convert_distant_scheme_to_local(&mut self)
pub fn convert_distant_scheme_to_local(&mut self)
Converts all URIs with distant
as the scheme to file
instead
sourcepub fn convert_scheme_to_local(&mut self, scheme: &str)
pub fn convert_scheme_to_local(&mut self, scheme: &str)
Converts all URIs with scheme
as the scheme to file
instead
Methods from Deref<Target = Map<String, Value>>§
sourcepub fn get<Q>(&self, key: &Q) -> Option<&Value>where
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn get<Q>(&self, key: &Q) -> Option<&Value>where String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn contains_key<Q>(&self, key: &Q) -> boolwhere
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn contains_key<Q>(&self, key: &Q) -> boolwhere String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value>where
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value>where String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Returns a mutable reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)>where
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)>where String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Returns the key-value pair matching the given key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn insert(&mut self, k: String, v: Value) -> Option<Value>
pub fn insert(&mut self, k: String, v: Value) -> Option<Value>
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old value is returned.
sourcepub fn remove<Q>(&mut self, key: &Q) -> Option<Value>where
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn remove<Q>(&mut self, key: &Q) -> Option<Value>where String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Removes a key from the map, returning the value at the key if the key was previously in the map.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)>where
String: Borrow<Q>,
Q: Ord + Eq + Hash + ?Sized,
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)>where String: Borrow<Q>, Q: Ord + Eq + Hash + ?Sized,
Removes a key from the map, returning the stored key and value if the key was previously in the map.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
sourcepub fn append(&mut self, other: &mut Map<String, Value>)
pub fn append(&mut self, other: &mut Map<String, Value>)
Moves all elements from other into self, leaving other empty.
sourcepub fn entry<S>(&mut self, key: S) -> Entry<'_>where
S: Into<String>,
pub fn entry<S>(&mut self, key: S) -> Entry<'_>where S: Into<String>,
Gets the given key’s corresponding entry in the map for in-place manipulation.
sourcepub fn values_mut(&mut self) -> ValuesMut<'_>
pub fn values_mut(&mut self) -> ValuesMut<'_>
Gets an iterator over mutable values of the map.
Trait Implementations§
source§impl Clone for LspContent
impl Clone for LspContent
source§fn clone(&self) -> LspContent
fn clone(&self) -> LspContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LspContent
impl Debug for LspContent
source§impl Deref for LspContent
impl Deref for LspContent
source§impl DerefMut for LspContent
impl DerefMut for LspContent
source§impl<'de> Deserialize<'de> for LspContent
impl<'de> Deserialize<'de> for LspContent
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>,
source§impl Display for LspContent
impl Display for LspContent
source§impl FromStr for LspContent
impl FromStr for LspContent
source§impl PartialEq<LspContent> for LspContent
impl PartialEq<LspContent> for LspContent
source§fn eq(&self, other: &LspContent) -> bool
fn eq(&self, other: &LspContent) -> bool
self
and other
values to be equal, and is used
by ==
.