pub struct ForeverVMClient { /* private fields */ }Implementations§
Source§impl ForeverVMClient
impl ForeverVMClient
pub fn new(api_base: Url, token: ApiToken) -> Self
pub fn server_url(&self) -> &Url
pub async fn repl(&self, machine_name: &MachineName) -> Result<ReplConnection>
pub async fn create_machine( &self, options: CreateMachineRequest, ) -> Result<CreateMachineResponse>
pub async fn list_machines( &self, options: ListMachinesRequest, ) -> Result<ListMachinesResponse>
pub async fn exec_instruction( &self, machine_name: &MachineName, instruction: Instruction, ) -> Result<ApiExecResponse>
pub async fn exec_result( &self, machine_name: &MachineName, instruction: InstructionSeq, ) -> Result<ApiExecResultResponse>
pub async fn whoami(&self) -> Result<WhoamiResponse>
Sourcepub async fn exec_result_stream(
&self,
machine_name: &MachineName,
instruction: InstructionSeq,
) -> Result<Pin<Box<dyn Stream<Item = Result<MessageFromServer>> + Send>>>
pub async fn exec_result_stream( &self, machine_name: &MachineName, instruction: InstructionSeq, ) -> Result<Pin<Box<dyn Stream<Item = Result<MessageFromServer>> + Send>>>
Returns a stream of MessageFromServer values from the execution result endpoint.
This method uses HTTP streaming to receive newline-delimited JSON responses
from the server. Each line is parsed into a MessageFromServer object.
Auto Trait Implementations§
impl Freeze for ForeverVMClient
impl !RefUnwindSafe for ForeverVMClient
impl Send for ForeverVMClient
impl Sync for ForeverVMClient
impl Unpin for ForeverVMClient
impl !UnwindSafe for ForeverVMClient
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