Struct juju::Context [] [src]

pub struct Context {
    pub relation_type: String,
    pub relation_id: usize,
    pub unit: String,
    pub relations: HashMap<StringString>,
}

Fields

relation_type: String

The scope for the current relation hook

relation_id: usize

The relation ID for the current relation hook

unit: String

Local unit ID

relations: HashMap<StringString>

relation data for all related units

Methods

impl Context
[src]

fn new_from_env() -> Context

Constructs a new Context Creates a context that's filled out from the env variables # Example usage extern crate juju; let context = juju::Context::new_from_env();

Trait Implementations

impl Debug for Context
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.