ServerOperations

Trait ServerOperations 

Source
pub trait ServerOperations {
    // Required methods
    fn list_servers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ServerList, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_server<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_server<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 CreateServerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn start_server<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        request: &'life2 StartServerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StartServerResponse, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn stop_server<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        request: &'life2 StopServerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StopServerResponse, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn restart_server<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        request: &'life2 RestartServerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<RestartServerResponse, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn modify_server<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        request: &'life2 ModifyServerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ModifyServerResponse, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn delete_server<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_server_and_storages<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        delete_backups: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_servers_by_labels<'life0, 'life1, 'async_trait>(
        &'life0 self,
        filter: &'life1 LabelFilter,
    ) -> Pin<Box<dyn Future<Output = Result<ServerList, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wait_for_server_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        uuid: &'life1 str,
        desired_state: Option<&'life2 ServerState>,
        undesired_state: Option<&'life3 ServerState>,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Operations for managing cloud servers.

This trait provides methods for creating, modifying, and managing cloud servers through the UpCloud API.

Required Methods§

Source

fn list_servers<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ServerList, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_server<'life0, 'life1, 'async_trait>( &'life0 self, uuid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_server<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 CreateServerRequest, ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn start_server<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uuid: &'life1 str, request: &'life2 StartServerRequest, ) -> Pin<Box<dyn Future<Output = Result<StartServerResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn stop_server<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uuid: &'life1 str, request: &'life2 StopServerRequest, ) -> Pin<Box<dyn Future<Output = Result<StopServerResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn restart_server<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uuid: &'life1 str, request: &'life2 RestartServerRequest, ) -> Pin<Box<dyn Future<Output = Result<RestartServerResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn modify_server<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uuid: &'life1 str, request: &'life2 ModifyServerRequest, ) -> Pin<Box<dyn Future<Output = Result<ModifyServerResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn delete_server<'life0, 'life1, 'async_trait>( &'life0 self, uuid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete_server_and_storages<'life0, 'life1, 'async_trait>( &'life0 self, uuid: &'life1 str, delete_backups: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_servers_by_labels<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 LabelFilter, ) -> Pin<Box<dyn Future<Output = Result<ServerList, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn wait_for_server_state<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, uuid: &'life1 str, desired_state: Option<&'life2 ServerState>, undesired_state: Option<&'life3 ServerState>, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<ServerDetails, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§