Struct lsp_types::PositionEncodingKind
source · pub struct PositionEncodingKind(/* private fields */);
Expand description
A type indicating how positions are encoded, specifically what column offsets mean.
@since 3.17.0
Implementations§
source§impl PositionEncodingKind
impl PositionEncodingKind
sourcepub const UTF8: PositionEncodingKind = _
pub const UTF8: PositionEncodingKind = _
Character offsets count UTF-8 code units.
sourcepub const UTF16: PositionEncodingKind = _
pub const UTF16: PositionEncodingKind = _
Character offsets count UTF-16 code units.
This is the default and must always be supported by servers
sourcepub const UTF32: PositionEncodingKind = _
pub const UTF32: PositionEncodingKind = _
Character offsets count UTF-32 code units.
Implementation note: these are the same as Unicode code points,
so this PositionEncodingKind
may also be used for an
encoding-agnostic representation of character offsets.
pub const fn new(tag: &'static str) -> Self
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl Clone for PositionEncodingKind
impl Clone for PositionEncodingKind
source§fn clone(&self) -> PositionEncodingKind
fn clone(&self) -> PositionEncodingKind
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 moresource§impl Debug for PositionEncodingKind
impl Debug for PositionEncodingKind
source§impl<'de> Deserialize<'de> for PositionEncodingKind
impl<'de> Deserialize<'de> for PositionEncodingKind
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<&'static str> for PositionEncodingKind
impl From<&'static str> for PositionEncodingKind
source§impl From<String> for PositionEncodingKind
impl From<String> for PositionEncodingKind
source§impl Hash for PositionEncodingKind
impl Hash for PositionEncodingKind
source§impl PartialEq for PositionEncodingKind
impl PartialEq for PositionEncodingKind
source§impl PartialOrd for PositionEncodingKind
impl PartialOrd for PositionEncodingKind
source§impl Serialize for PositionEncodingKind
impl Serialize for PositionEncodingKind
impl Eq for PositionEncodingKind
impl StructuralPartialEq for PositionEncodingKind
Auto Trait Implementations§
impl Freeze for PositionEncodingKind
impl RefUnwindSafe for PositionEncodingKind
impl Send for PositionEncodingKind
impl Sync for PositionEncodingKind
impl Unpin for PositionEncodingKind
impl UnwindSafe for PositionEncodingKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.