pub struct ServerClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> ServerClient<'a>
impl<'a> ServerClient<'a>
pub fn new(api_client: &'a Client) -> Self
Sourcepub async fn list(&self) -> Result<Vec<Server>, Error>
pub async fn list(&self) -> Result<Vec<Server>, Error>
List all servers
200 OK – An array of servers Returns: array of Server objects
400 Bad Request – The supplied request was not valid Returns: Error object
404 Not Found – Requested item was not found Returns: Error object
422 Unprocessable Entity – The input to the operation was not valid Returns: Error object
500 Internal Server Error – Internal server error Returns: Error object
Sourcepub async fn get(&self, server_id: &str) -> Result<Server, Error>
pub async fn get(&self, server_id: &str) -> Result<Server, Error>
List a server
§Arguments
server_id- The id of the server to retrieve
200 OK – An server Returns: Server object
400 Bad Request – The supplied request was not valid Returns: Error object
404 Not Found – Requested item was not found Returns: Error object
422 Unprocessable Entity – The input to the operation was not valid Returns: Error object
500 Internal Server Error – Internal server error Returns: Error object
Auto Trait Implementations§
impl<'a> Freeze for ServerClient<'a>
impl<'a> !RefUnwindSafe for ServerClient<'a>
impl<'a> Send for ServerClient<'a>
impl<'a> Sync for ServerClient<'a>
impl<'a> Unpin for ServerClient<'a>
impl<'a> !UnwindSafe for ServerClient<'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