[][src]Struct efflux::context::Context

pub struct Context { /* fields omitted */ }

Context structure to represent a Hadoop job context.

This acts as an arbitrarily-typed bag, allowing for easy storage of random types between iterations of the stage. See the module documentation for further details and examples.

Methods

impl Context
[src]

pub fn new() -> Self
[src]

Creates a new Context.

pub fn get<T: Contextual>(&self) -> Option<&T> where
    T: Contextual
[src]

Retrieves a potential reference to a Contextual type.

pub fn get_mut<T>(&mut self) -> Option<&mut T> where
    T: Contextual
[src]

Retrieves a potential mutable reference to a Contextual type.

pub fn insert<T>(&mut self, t: T) where
    T: Contextual
[src]

Inserts a Contextual type into the context.

pub fn take<T>(&mut self) -> Option<T> where
    T: Contextual
[src]

Takes a Contextual type from the context.

pub fn write(&mut self, key: &[u8], val: &[u8])
[src]

Writes a key/value pair to the stage output.

pub fn write_fmt<K, V>(&mut self, key: K, val: V) where
    K: Display,
    V: Display
[src]

Writes a key/value formatted pair to the stage output.

This is a simple sugar API around write which allows callers to provide a type which implements Display to serialize automatically.

Trait Implementations

impl Debug for Context
[src]

Auto Trait Implementations

impl !Send for Context

impl !Sync for Context

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

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