Struct vultr::VultrApi

source ·
pub struct VultrApi { /* private fields */ }

Implementations§

source§

impl<'a> VultrApi

source

pub fn new<S>(token: S) -> VultrApi
where S: Into<String>,

source

pub async fn get_account_info_async(&self) -> Result<VultrAccount, VultrError>

source

pub async fn get_dns_domain_list_async( &self ) -> Result<Vec<VultrDomain>, VultrError>

source

pub async fn get_dns_domain_async<S>( &self, domain: S ) -> Result<VultrDomain, VultrError>
where S: Into<String>,

source

pub async fn delete_dns_domain_async<S>( &self, domain: S ) -> Result<(), VultrError>
where S: Into<String>,

source

pub async fn create_dns_domain_async<S>( &self, domain: S, ip: Option<String>, dns_sec: bool ) -> Result<VultrDomain, VultrError>
where S: Into<String>,

source

pub async fn create_dns_domain_record_async<S1, S2, S3, S4>( &self, domain: S1, record_type: S2, name: S3, ip: S4, ttl: Option<u32>, priority: Option<u32> ) -> Result<VultrDomainRecord, VultrError>
where S1: Into<String>, S2: Into<String>, S3: Into<String>, S4: Into<String>,

source

pub async fn get_dns_domain_records_async<S>( &self, domain: S ) -> Result<Vec<VultrDomainRecord>, VultrError>
where S: Into<String>,

source

pub async fn delete_dns_domain_record_async<S1, S2>( &self, domain: S1, record_id: S2 ) -> Result<(), VultrError>
where S1: Into<String>, S2: Into<String>,

source

pub async fn get_plans_async(&self) -> Result<Vec<VultrPlan>, VultrError>

source

pub async fn get_regions_async(&self) -> Result<Vec<VultrRegion>, VultrError>

source

pub async fn get_os_list_async(&self) -> Result<Vec<VultrOS>, VultrError>

source

pub async fn get_sshkey_list_async( &self ) -> Result<Vec<VultrSSHKey>, VultrError>

source

pub async fn get_sshkey_async<S>( &self, key_id: S ) -> Result<VultrSSHKey, VultrError>
where S: Into<String>,

source

pub async fn create_sshkey_async<S>( &self, name: S, ssh_key: S ) -> Result<VultrSSHKey, VultrError>
where S: Into<String>,

source

pub async fn delete_sshkey_async<S>(&self, key_id: S) -> Result<(), VultrError>
where S: Into<String>,

source

pub async fn get_instance_list_async( &self ) -> Result<Vec<VultrInstance>, VultrError>

source

pub async fn get_instance_async<S>( &self, instance_id: S ) -> Result<VultrInstance, VultrError>
where S: Into<String>,

source

pub fn create_instance<S1, S2>( &self, region_id: S1, plan_id: S2, instance_type: VultrInstanceType ) -> CreateInstanceBuilder
where S1: Into<String>, S2: Into<String>,

source

pub async fn delete_instance_async<S>( &self, instance_id: S ) -> Result<(), VultrError>
where S: Into<String>,

Trait Implementations§

source§

impl Clone for VultrApi

source§

fn clone(&self) -> VultrApi

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more