Struct kube_runtime::controller::Context[][src]

pub struct Context<T>(_);

A context data type that’s passed through to the controllers callbacks

Context gets passed to both the reconciler and the error_policy callbacks, allowing a read-only view of the world without creating a big nested lambda. More or less the same as Actix’s Data.

Implementations

impl<T> Context<T>[src]

#[must_use]pub fn new(state: T) -> Context<T>[src]

Create new Context instance.

#[must_use]pub fn get_ref(&self) -> &T[src]

Get reference to inner controller data.

#[must_use]pub fn into_inner(self) -> Arc<T>[src]

Convert to the internal Arc<T>.

Trait Implementations

impl<T> Clone for Context<T>[src]

impl<T: Debug> Debug for Context<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Context<T> where
    T: RefUnwindSafe

impl<T> Send for Context<T> where
    T: Send + Sync

impl<T> Sync for Context<T> where
    T: Send + Sync

impl<T> Unpin for Context<T>

impl<T> UnwindSafe for Context<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<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.