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§fn eq(&self, other: &PositionEncodingKind) -> bool
fn eq(&self, other: &PositionEncodingKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PositionEncodingKind
impl PartialOrd for PositionEncodingKind
source§fn partial_cmp(&self, other: &PositionEncodingKind) -> Option<Ordering>
fn partial_cmp(&self, other: &PositionEncodingKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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