Struct V4Client

Source
pub struct V4Client<C>
where C: Client,
{ pub access_token: Option<AccessToken>, pub base_url: Option<Url>, /* private fields */ }

Fields§

§access_token: Option<AccessToken>§base_url: Option<Url>

Implementations§

Source§

impl<C> V4Client<C>
where C: Client,

Source

pub async fn linode_instances_linodes_list( &self, page: impl Into<Option<usize>>, page_size: impl Into<Option<usize>>, ) -> Result<ResponseBody, V4ClientRespondError<C>>

Source

pub async fn linode_instances_linode_create<F>( &self, region: &str, type: &str, f: F, ) -> Result<ResponseBody, V4ClientRespondError<C>>
where F: FnMut(&mut RequestBody),

Source

pub async fn linode_instances_linode_delete( &self, linode_id: LinodeId, ) -> Result<(), V4ClientRespondError<C>>

Source

pub async fn linode_instances_linode_view( &self, linode_id: LinodeId, ) -> Result<ResponseBody, V4ClientRespondError<C>>

Source

pub async fn linode_instances_linode_boot( &self, linode_id: LinodeId, config_id: ConfigId, ) -> Result<(), V4ClientRespondError<C>>

Source

pub async fn linode_instances_linode_reboot( &self, linode_id: LinodeId, config_id: Option<ConfigId>, ) -> Result<(), V4ClientRespondError<C>>

Source

pub async fn linode_instances_ip_addresses_info( &self, linode_id: LinodeId, ) -> Result<ResponseBody, V4ClientRespondError<C>>

Source

pub async fn linode_instances_config_create<F>( &self, linode_id: LinodeId, label: &str, f: F, ) -> Result<ResponseBody, V4ClientRespondError<C>>
where F: FnMut(&mut RequestBody),

Source

pub async fn linode_instances_disk_create_with_image<F>( &self, linode_id: LinodeId, size: usize, image: &str, root_pass: &str, f: F, ) -> Result<ResponseBody, V4ClientRespondError<C>>
where F: FnMut(&mut RequestBodyWithImage),

Source

pub async fn linode_instances_disk_view( &self, linode_id: LinodeId, disk_id: DiskId, ) -> Result<ResponseBody, V4ClientRespondError<C>>

Source

pub async fn linode_types_types_list( &self, ) -> Result<ResponseBody, V4ClientRespondError<C>>

Source§

impl<C> V4Client<C>
where C: Client,

Source

pub fn new( inner: C, access_token: Option<AccessToken>, base_url: Option<Url>, ) -> Self

Source

pub async fn respond<ReqQuery, ReqBody, RespBody>( &self, method: Method, path: &str, query: Option<&ReqQuery>, body: Option<&ReqBody>, ) -> Result<(StatusCode, RespBody, HeaderMap), V4ClientRespondError<C>>
where ReqQuery: Serialize, ReqBody: Serialize, RespBody: DeserializeOwned,

Trait Implementations§

Source§

impl<C> Clone for V4Client<C>
where C: Client + Clone,

Source§

fn clone(&self) -> Self

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§

§

impl<C> Freeze for V4Client<C>
where C: Freeze,

§

impl<C> RefUnwindSafe for V4Client<C>
where C: RefUnwindSafe,

§

impl<C> Send for V4Client<C>
where C: Send,

§

impl<C> Sync for V4Client<C>
where C: Sync,

§

impl<C> Unpin for V4Client<C>
where C: Unpin,

§

impl<C> UnwindSafe for V4Client<C>
where C: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

Source§

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>,

Source§

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>,

Source§

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T