Struct lsp2::DocumentFilter
pub struct DocumentFilter {
pub language: Option<String>,
pub scheme: Option<String>,
pub pattern: Option<String>,
}
Expand description
A document filter denotes a document through properties like language, schema or pattern. Examples are a filter that applies to TypeScript files on disk or a filter the applies to JSON files with name package.json:
{ language: ‘typescript’, scheme: ‘file’ } { language: ‘json’, pattern: ‘**/package.json’ }
Fields§
§language: Option<String>
A language id, like typescript
.
scheme: Option<String>
A Uri scheme, like file
or untitled
.
pattern: Option<String>
A glob pattern, like *.{ts,js}
.
Trait Implementations§
§impl Clone for DocumentFilter
impl Clone for DocumentFilter
§fn clone(&self) -> DocumentFilter
fn clone(&self) -> DocumentFilter
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 more§impl Debug for DocumentFilter
impl Debug for DocumentFilter
§impl<'de> Deserialize<'de> for DocumentFilter
impl<'de> Deserialize<'de> for DocumentFilter
§fn deserialize<__D>(
__deserializer: __D
) -> Result<DocumentFilter, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<DocumentFilter, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<DocumentFilter> for DocumentFilter
impl PartialEq<DocumentFilter> for DocumentFilter
§fn eq(&self, other: &DocumentFilter) -> bool
fn eq(&self, other: &DocumentFilter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for DocumentFilter
impl Serialize for DocumentFilter
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for DocumentFilter
impl StructuralEq for DocumentFilter
impl StructuralPartialEq for DocumentFilter
Auto Trait Implementations§
impl RefUnwindSafe for DocumentFilter
impl Send for DocumentFilter
impl Sync for DocumentFilter
impl Unpin for DocumentFilter
impl UnwindSafe for DocumentFilter
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.