pub(crate) enum Encoding {
Utf8,
Utf16,
}Expand description
The unit LSP positions count columns in, agreed with the client at startup.
Variants§
Implementations§
Source§impl Encoding
impl Encoding
Sourcepub(crate) fn negotiate(capabilities: &ClientCapabilities) -> Self
pub(crate) fn negotiate(capabilities: &ClientCapabilities) -> Self
UTF-8 matches nifty’s byte spans, so it is used when the client offers it. UTF-16 is the protocol’s default and every client supports it.
pub(crate) fn kind(self) -> PositionEncodingKind
fn units(self, c: char) -> usize
pub(crate) fn len(self, text: &str) -> u32
Trait Implementations§
impl Copy for Encoding
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnsafeUnpin for Encoding
impl UnwindSafe for Encoding
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