[][src]Struct k8s_openapi::api::coordination::v1beta1::Lease

pub struct Lease {
    pub metadata: Option<ObjectMeta>,
    pub spec: Option<LeaseSpec>,
}

Lease defines a lease concept.

Fields

metadata: Option<ObjectMeta>

More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec: Option<LeaseSpec>

Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Methods

impl Lease[src]

pub fn create_namespaced_lease(
    namespace: &str,
    body: &Lease,
    optional: CreateNamespacedLeaseOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateNamespacedLeaseResponse>), RequestError>
[src]

create a Lease

Use the returned crate::ResponseBody<CreateNamespacedLeaseResponse> constructor, or CreateNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • namespace

    object name and auth scope, such as for teams and projects

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn delete_collection_namespaced_lease(
    namespace: &str,
    delete_optional: DeleteOptional,
    list_optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteCollectionNamespacedLeaseResponse>), RequestError>
[src]

delete collection of Lease

Use the returned crate::ResponseBody<DeleteCollectionNamespacedLeaseResponse> constructor, or DeleteCollectionNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • namespace

    object name and auth scope, such as for teams and projects

  • delete_optional

    Delete options. Use Default::default() to not pass any.

  • list_optional

    List options. Use Default::default() to not pass any.

impl Lease[src]

pub fn delete_namespaced_lease(
    name: &str,
    namespace: &str,
    optional: DeleteOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteNamespacedLeaseResponse>), RequestError>
[src]

delete a Lease

Use the returned crate::ResponseBody<DeleteNamespacedLeaseResponse> constructor, or DeleteNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the Lease

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn list_lease_for_all_namespaces(
    optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListLeaseForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind Lease

This operation only supports listing all items of this type.

Use the returned crate::ResponseBody<ListLeaseForAllNamespacesResponse> constructor, or ListLeaseForAllNamespacesResponse directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn list_namespaced_lease(
    namespace: &str,
    optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNamespacedLeaseResponse>), RequestError>
[src]

list or watch objects of kind Lease

This operation only supports listing all items of this type.

Use the returned crate::ResponseBody<ListNamespacedLeaseResponse> constructor, or ListNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn patch_namespaced_lease(
    name: &str,
    namespace: &str,
    body: &Patch,
    optional: PatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<PatchNamespacedLeaseResponse>), RequestError>
[src]

partially update the specified Lease

Use the returned crate::ResponseBody<PatchNamespacedLeaseResponse> constructor, or PatchNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the Lease

  • namespace

    object name and auth scope, such as for teams and projects

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn read_namespaced_lease(
    name: &str,
    namespace: &str,
    optional: ReadNamespacedLeaseOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReadNamespacedLeaseResponse>), RequestError>
[src]

read the specified Lease

Use the returned crate::ResponseBody<ReadNamespacedLeaseResponse> constructor, or ReadNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the Lease

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn replace_namespaced_lease(
    name: &str,
    namespace: &str,
    body: &Lease,
    optional: ReplaceNamespacedLeaseOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceNamespacedLeaseResponse>), RequestError>
[src]

replace the specified Lease

Use the returned crate::ResponseBody<ReplaceNamespacedLeaseResponse> constructor, or ReplaceNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the Lease

  • namespace

    object name and auth scope, such as for teams and projects

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn watch_lease_for_all_namespaces(
    optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchLeaseForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind Lease

This operation only supports watching one item, or a list of items, of this type for changes.

Use the returned crate::ResponseBody<WatchLeaseForAllNamespacesResponse> constructor, or WatchLeaseForAllNamespacesResponse directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl Lease[src]

pub fn watch_namespaced_lease(
    namespace: &str,
    optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNamespacedLeaseResponse>), RequestError>
[src]

list or watch objects of kind Lease

This operation only supports watching one item, or a list of items, of this type for changes.

Use the returned crate::ResponseBody<WatchNamespacedLeaseResponse> constructor, or WatchNamespacedLeaseResponse directly, to parse the HTTP response.

Arguments

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

Trait Implementations

impl Resource for Lease[src]

impl Metadata for Lease[src]

type Ty = ObjectMeta

The type of the metadata object.

impl Clone for Lease[src]

impl Default for Lease[src]

impl PartialEq<Lease> for Lease[src]

impl Debug for Lease[src]

impl Serialize for Lease[src]

impl<'de> Deserialize<'de> for Lease[src]

Auto Trait Implementations

impl Send for Lease

impl Sync for Lease

impl Unpin for Lease

impl UnwindSafe for Lease

impl RefUnwindSafe for Lease

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]