Struct distant_core::LspContent
source · [−]pub struct LspContent(_);
Expand description
Represents the content for LSP data
Implementations
sourceimpl 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_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
Methods from Deref<Target = Map<String, Value>>
sourcepub fn get<Q>(&self, key: &Q) -> Option<&Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn get<Q>(&self, key: &Q) -> Option<&Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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) -> bool where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn contains_key<Q>(&self, key: &Q) -> bool where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn remove<Q>(&mut self, key: &Q) -> Option<Value> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)> where
Q: Ord + Eq + Hash + ?Sized,
String: Borrow<Q>,
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
sourceimpl Clone for LspContent
impl Clone for LspContent
sourcefn clone(&self) -> LspContent
fn clone(&self) -> LspContent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LspContent
impl Debug for LspContent
sourceimpl Deref for LspContent
impl Deref for LspContent
sourceimpl DerefMut for LspContent
impl DerefMut for LspContent
sourceimpl<'de> Deserialize<'de> for LspContent
impl<'de> Deserialize<'de> for LspContent
sourcefn 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
sourceimpl Display for LspContent
impl Display for LspContent
sourceimpl FromStr for LspContent
impl FromStr for LspContent
sourceimpl PartialEq<LspContent> for LspContent
impl PartialEq<LspContent> for LspContent
sourcefn eq(&self, other: &LspContent) -> bool
fn eq(&self, other: &LspContent) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for LspContent
impl Serialize for LspContent
impl Eq for LspContent
impl StructuralEq for LspContent
impl StructuralPartialEq for LspContent
Auto Trait Implementations
impl RefUnwindSafe for LspContent
impl Send for LspContent
impl Sync for LspContent
impl Unpin for LspContent
impl UnwindSafe for LspContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more