pub struct ServerBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> ServerBuilder<'a>
impl<'a> ServerBuilder<'a>
pub fn new( logger: &'a Logger, server_params: &'a ResolvedServerParams, launcher_paths: &'a LauncherPaths, http: BoxedHttp, ) -> Self
Sourcepub async fn get_running(&self) -> Result<Option<AnyCodeServer>, AnyError>
pub async fn get_running(&self) -> Result<Option<AnyCodeServer>, AnyError>
Gets any already-running server from this directory.
Sourcepub async fn setup(&self) -> Result<(), AnyError>
pub async fn setup(&self) -> Result<(), AnyError>
Ensures the server is set up in the configured directory.
pub async fn listen_on_port( &self, port: u16, ) -> Result<PortCodeServer, AnyError>
Sourcepub async fn install_extensions(&self) -> Result<(), AnyError>
pub async fn install_extensions(&self) -> Result<(), AnyError>
Runs the command that just installs extensions and exits.
pub async fn listen_on_default_socket( &self, ) -> Result<SocketCodeServer, AnyError>
pub async fn listen_on_socket( &self, socket: &Path, ) -> Result<SocketCodeServer, AnyError>
Sourcepub async fn start_opaque_with_args<M, R>(
&self,
args: &[String],
) -> Result<(CodeServerOrigin, Receiver<R>), AnyError>
pub async fn start_opaque_with_args<M, R>( &self, args: &[String], ) -> Result<(CodeServerOrigin, Receiver<R>), AnyError>
Starts with a given opaque set of args. Does not set up any port or socket, but does return one if present, in the form of a channel.
Auto Trait Implementations§
impl<'a> Freeze for ServerBuilder<'a>
impl<'a> !RefUnwindSafe for ServerBuilder<'a>
impl<'a> Send for ServerBuilder<'a>
impl<'a> Sync for ServerBuilder<'a>
impl<'a> Unpin for ServerBuilder<'a>
impl<'a> !UnwindSafe for ServerBuilder<'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