Struct transip::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client is the main entry for this library. Creation is done by using Client::try_from(configuration). After creation of a client, this client can be used to call a Transip API call. Each call starts with a check to see if we have a valid JWT token If the token is expired or non existant then the Transip API call for requesting a new token is called Tokens are persisted to disk on exit and reused if not expired on application startup

Implementations§

source§

impl Client

source

pub fn demo() -> Self

Trait Implementations§

source§

impl AccountApi for Client

source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DnsApi for Client

source§

fn dns_entry_delete(&mut self, domain_name: &str, entry: DnsEntry) -> Result<()>

source§

fn dns_entry_delete_all<F>(&mut self, domain_name: &str, f: F) -> Result<()>
where F: Fn(&DnsEntry) -> bool,

Delete all entries which comply to Filter F
source§

fn dns_entry_list(&mut self, domain_name: &str) -> Result<Vec<DnsEntry>>

source§

fn dns_entry_insert(&mut self, domain_name: &str, entry: DnsEntry) -> Result<()>

source§

impl DomainApi for Client

source§

impl Drop for Client

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl GeneralApi for Client

source§

impl TransipApiVps for Client

source§

fn vps_list(&mut self) -> Result<Vec<Vps>>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps(&mut self, name: &str) -> Result<Vps>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps_stop(&mut self, name: &str) -> Result<()>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps_start(&mut self, name: &str) -> Result<()>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps_reset(&mut self, name: &str) -> Result<()>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps_set_is_locked(&mut self, name: &str, locked: bool) -> Result<()>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

fn vps_set_description(&mut self, name: &str, description: &str) -> Result<()>

👎Deprecated since 0.1.2: This name is not consistent with the rest. Users should instead transip::api::vps::VpsApi
source§

impl TryFrom<Box<dyn Configuration>> for Client

§

type Error = Error

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

fn try_from(configuration: Box<dyn Configuration>) -> Result<Self>

Performs the conversion.
source§

impl VpsApi for Client

source§

fn vps_list(&mut self) -> Result<Vec<Vps>>

source§

fn vps(&mut self, name: &str) -> Result<Vps>

source§

fn vps_stop(&mut self, name: &str) -> Result<()>

source§

fn vps_start(&mut self, name: &str) -> Result<()>

source§

fn vps_reset(&mut self, name: &str) -> Result<()>

source§

fn vps_set_is_locked(&mut self, name: &str, locked: bool) -> Result<()>

source§

fn vps_set_description(&mut self, name: &str, description: &str) -> Result<()>

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl !Send for Client

§

impl !Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

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.

source§

impl<T> Instrument for T

source§

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

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

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, 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.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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