Struct kube_core::request::Request[][src]

pub struct Request {
    pub url_path: String,
}
Expand description

A Kubernetes request builder

Takes a base_path and supplies constructors for common operations The extra operations all return http::Request objects.

Fields

url_path: String
Expand description

The path component of a url

Implementations

impl Request[src]

pub fn new<S: Into<String>>(url_path: S) -> Self[src]

New request with a resource’s url path

impl Request[src]

Convenience methods found from API conventions

pub fn list(&self, lp: &ListParams) -> Result<Request<Vec<u8>>>[src]

List a collection of a resource

pub fn watch(&self, lp: &ListParams, ver: &str) -> Result<Request<Vec<u8>>>[src]

Watch a resource at a given version

pub fn get(&self, name: &str) -> Result<Request<Vec<u8>>>[src]

Get a single instance

pub fn create(&self, pp: &PostParams, data: Vec<u8>) -> Result<Request<Vec<u8>>>[src]

Create an instance of a resource

pub fn delete(&self, name: &str, dp: &DeleteParams) -> Result<Request<Vec<u8>>>[src]

Delete an instance of a resource

pub fn delete_collection(
    &self,
    dp: &DeleteParams,
    lp: &ListParams
) -> Result<Request<Vec<u8>>>
[src]

Delete a collection of a resource

pub fn patch<P: Serialize>(
    &self,
    name: &str,
    pp: &PatchParams,
    patch: &Patch<P>
) -> Result<Request<Vec<u8>>>
[src]

Patch an instance of a resource

Requires a serialized merge-patch+json at the moment.

pub fn replace(
    &self,
    name: &str,
    pp: &PostParams,
    data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]

Replace an instance of a resource

Requires metadata.resourceVersion set in data

impl Request[src]

Subresources

pub fn get_subresource(
    &self,
    subresource_name: &str,
    name: &str
) -> Result<Request<Vec<u8>>>
[src]

Get an instance of the subresource

pub fn patch_subresource<P: Serialize>(
    &self,
    subresource_name: &str,
    name: &str,
    pp: &PatchParams,
    patch: &Patch<P>
) -> Result<Request<Vec<u8>>>
[src]

Patch an instance of the subresource

pub fn replace_subresource(
    &self,
    subresource_name: &str,
    name: &str,
    pp: &PostParams,
    data: Vec<u8>
) -> Result<Request<Vec<u8>>>
[src]

Replace an instance of the subresource

impl Request[src]

pub fn logs(&self, name: &str, lp: &LogParams) -> Result<Request<Vec<u8>>>[src]

Get a pod logs

impl Request[src]

pub fn evict(&self, name: &str, ep: &EvictParams) -> Result<Request<Vec<u8>>>[src]

Create an eviction

Trait Implementations

impl Clone for Request[src]

fn clone(&self) -> Request[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Request[src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for Request

impl Send for Request

impl Sync for Request

impl Unpin for Request

impl UnwindSafe for Request

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.