pub fn new(state: Option<State>, description: Option<&str>) -> Resource {
        Resource {
            state,
            metrics: Vec::new(),
            description: description.map(|d| d.to_owned()),
            name: None,
        }
    }
/// If state is set to Some(State) then it will always use this instead of determining it from
/// the given metrics.
///
/// If you want to create a Resource from some metrics with automatic determination of the
/// state you can use the *resource!* macro.
If state is set to Some(State) then it will always use this instead of determining it from
the given metrics.

If you want to create a Resource from some metrics with automatic determination of the
state you can use the *resource!* macro.
If state is set to Some ( State ) then it will always use this instead of determining it from the given metrics . If you want to create a Resource from some metrics with automatic determination of the state you can use the * resource! * macro .
pub fn new(state: Option<State>, description: Option<&str>) -> Resource {
        Resource {
            state,
            metrics: Vec::new(),
            description: description.map(|d| d.to_owned()),
            name: None,
        }
    }
pub fn new ( state : Option < State > , description : Option < & str > ) -> Resource { Resource { state , metrics : Vec :: new ( ) , description : description . map ( | d | d . to_owned ( ) ) , name : None , } }
If state is set to Some(State) then it will always use this instead of determining it from
the given metrics.
If state is set to Some ( State ) then it will always use this instead of determining it from the given metrics .
state
Option<State>
description
Option<&str>
state
Option<State>
description
Option<&str>