pub struct DigitalOceanClient { /* private fields */ }Implementations§
Source§impl DigitalOceanClient
impl DigitalOceanClient
pub fn new(api_token: String) -> Result<Self, DigitalOceanError>
pub async fn create_droplet( &self, request: DropletCreateRequest, ) -> Result<Droplet, DigitalOceanError>
pub async fn get_droplet( &self, droplet_id: i64, ) -> Result<Droplet, DigitalOceanError>
pub async fn destroy_droplet( &self, droplet_id: i64, ) -> Result<(), DigitalOceanError>
pub async fn shutdown_droplet( &self, droplet_id: i64, ) -> Result<(), DigitalOceanError>
pub async fn reboot_droplet( &self, droplet_id: i64, ) -> Result<(), DigitalOceanError>
Auto Trait Implementations§
impl Freeze for DigitalOceanClient
impl !RefUnwindSafe for DigitalOceanClient
impl Send for DigitalOceanClient
impl Sync for DigitalOceanClient
impl Unpin for DigitalOceanClient
impl !UnwindSafe for DigitalOceanClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more