pub struct Server<'a> { /* private fields */ }Expand description
The server: where it runs, how it starts hosts, and its session.
Implementations§
Source§impl<'a> Server<'a>
impl<'a> Server<'a>
Sourcepub fn new(cwd: PathBuf, launch: Box<dyn Launch<'a> + 'a>) -> Self
pub fn new(cwd: PathBuf, launch: Box<dyn Launch<'a> + 'a>) -> Self
A server in the working folder cwd, starting hosts with
launch. It answers every call itself until given
Self::forwarding.
Sourcepub fn forwarding(self, forwarding: Box<dyn Forwarding<'a> + 'a>) -> Self
pub fn forwarding(self, forwarding: Box<dyn Forwarding<'a> + 'a>) -> Self
The server, handing each call whose project is in another workspace
to that workspace’s own server, which forwarding starts.
Sourcepub fn folder(&self) -> &Path
pub fn folder(&self) -> &Path
The session’s folder: the client’s first root, or the working folder.
Sourcepub fn handle(&mut self, message: &str) -> Vec<String>
pub fn handle(&mut self, message: &str) -> Vec<String>
The messages to write for message, one JSON-RPC message: its
response if it wants one (a notification and a response want none),
and the server’s own request or notification it led to.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Server<'a>
impl<'a> !Send for Server<'a>
impl<'a> !Sync for Server<'a>
impl<'a> !UnwindSafe for Server<'a>
impl<'a> Freeze for Server<'a>
impl<'a> Unpin for Server<'a>
impl<'a> UnsafeUnpin for Server<'a>
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