pub struct InboundShowDocument {
pub server_id: Arc<str>,
pub workspace: Arc<Path>,
pub uri: Uri,
pub external: bool,
pub take_focus: bool,
pub selection: Option<Range>,
pub response: Sender<ShowDocumentOutcome>,
}Expand description
One server-initiated window/showDocument request, ferried
from the LSP actor to the editor’s per-tick drain.
Fields§
§server_id: Arc<str>Server that sent the request. Used by the handler’s echo /
log so the user can tell which language server is
asking. Cheap to clone (Arc<str>).
workspace: Arc<Path>Workspace root the originating actor was spawned against
(B’.2). Pairs with server_id to form the canonical
(server_id, workspace) instance key so the handler’s log
routes the show-document trail to the correct
*lsp:<server>:<workspace>* ring.
uri: UriURI to open. The handler inspects the scheme to decide between in-editor open vs. external-handler delegation.
external: boolTrue iff the server prefers an external handler (OS browser / shell). Spec defaults to false; we keep the server’s wire value.
take_focus: boolTrue iff the new buffer / external window should take focus. Single-window today, so this is recorded but not yet acted on (parity with the retired drain).
selection: Option<Range>Optional selection range to place after opening (LSP positions; the host converts the UTF-16 column to a byte offset against the opened line).
response: Sender<ShowDocumentOutcome>Oneshot the handler fills after mapping the open. The
actor task awaits this and converts the outcome into the
LSP Response.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for InboundShowDocument
impl !RefUnwindSafe for InboundShowDocument
impl !UnwindSafe for InboundShowDocument
impl Send for InboundShowDocument
impl Sync for InboundShowDocument
impl Unpin for InboundShowDocument
impl UnsafeUnpin for InboundShowDocument
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more