pub struct ServerManager { /* private fields */ }Implementations§
Source§impl ServerManager
impl ServerManager
pub fn new(client: ColabClient, config: &ColabConfig) -> Self
pub async fn list(&self) -> Result<(Vec<StoredServer>, usize)>
pub fn list_local(&self) -> Result<Vec<StoredServer>>
Sourcepub fn client(&self) -> &ColabClient
pub fn client(&self) -> &ColabClient
Borrow the inner Colab API client. Lets handlers reuse the
already-built reqwest::Client (rustls + http2 + connection
pool) instead of constructing a fresh one per command, which
was previously costing ~20-40 ms of cold-handshake setup on
every short-lived invocation.
pub async fn assign( &self, label: String, variant: Variant, accelerator: Option<String>, shape: Shape, ) -> Result<AssignOutcome>
pub async fn reconfigure( &self, id: Uuid, variant: Variant, accelerator: Option<String>, shape: Shape, ) -> Result<AssignOutcome>
pub async fn remove(&self, id: Uuid) -> Result<()>
pub async fn refresh(&self, id: Uuid) -> Result<StoredServer>
Auto Trait Implementations§
impl !Freeze for ServerManager
impl !RefUnwindSafe for ServerManager
impl Send for ServerManager
impl Sync for ServerManager
impl Unpin for ServerManager
impl UnsafeUnpin for ServerManager
impl !UnwindSafe for ServerManager
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