Struct hal::resource::Resource [-] [+] [src]

pub struct Resource {
    // some fields omitted
}

Methods

impl Resource

fn new() -> Resource

fn with_self<S>(uri: S) -> Resource where S: Into<String>

fn from_json(json: Json) -> Resource

This feature is still experimental.

fn add_state<S, V>(&mut self, key: S, value: V) -> &mut Resource where V: ToHalState, S: Into<String>

fn add_curie<S>(&mut self, name: S, href: S) -> &mut Resource where S: Into<String>

fn add_resource<S>(&mut self, rel: S, resource: &Resource) -> &mut Resource where S: Into<String>

Trait Implementations

impl ToJson for Resource

fn to_json(&self) -> Json

Derived Implementations

impl Debug for Resource

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

impl PartialEq for Resource

fn eq(&self, __arg_0: &Resource) -> bool

fn ne(&self, __arg_0: &Resource) -> bool

impl Clone for Resource

fn clone(&self) -> Resource

fn clone_from(&mut self, source: &Self)