Trait raystack::ValueExt [−][src]
pub trait ValueExt {
Show methods
fn as_hs_coord(&self) -> Option<Coord>;
fn as_hs_date(&self) -> Option<Date>;
fn as_hs_date_time(&self) -> Option<DateTime>;
fn as_hs_marker(&self) -> Option<Marker>;
fn as_hs_na(&self) -> Option<Na>;
fn as_hs_number(&self) -> Option<Number>;
fn as_hs_ref(&self) -> Option<Ref>;
fn as_hs_remove_marker(&self) -> Option<RemoveMarker>;
fn as_hs_str(&self) -> Option<&str>;
fn as_hs_symbol(&self) -> Option<Symbol>;
fn as_hs_time(&self) -> Option<Time>;
fn as_hs_uri(&self) -> Option<Uri>;
fn as_hs_xstr(&self) -> Option<Xstr>;
fn is_hs_coord(&self) -> bool;
fn is_hs_date(&self) -> bool;
fn is_hs_date_time(&self) -> bool;
fn is_hs_marker(&self) -> bool;
fn is_hs_na(&self) -> bool;
fn is_hs_number(&self) -> bool;
fn is_hs_ref(&self) -> bool;
fn is_hs_remove_marker(&self) -> bool;
fn is_hs_str(&self) -> bool;
fn is_hs_symbol(&self) -> bool;
fn is_hs_time(&self) -> bool;
fn is_hs_uri(&self) -> bool;
fn is_hs_xstr(&self) -> bool;
}Expand description
An extension trait for the serde_json::Value enum,
containing helper functions which make it easier to
parse specific Haystack types from the underlying Hayson encoding
(a JSON value in a specific format, see https://github.com/j2inn/hayson).
Required methods
fn as_hs_coord(&self) -> Option<Coord>[src]
fn as_hs_coord(&self) -> Option<Coord>[src]Convert the JSON value to a Haystack Coord.
fn as_hs_date(&self) -> Option<Date>[src]
fn as_hs_date(&self) -> Option<Date>[src]Convert the JSON value to a Haystack Date.
fn as_hs_date_time(&self) -> Option<DateTime>[src]
fn as_hs_date_time(&self) -> Option<DateTime>[src]Convert the JSON value to a Haystack DateTime.
fn as_hs_marker(&self) -> Option<Marker>[src]
fn as_hs_marker(&self) -> Option<Marker>[src]Convert the JSON value to a Haystack Marker.
fn as_hs_number(&self) -> Option<Number>[src]
fn as_hs_number(&self) -> Option<Number>[src]Convert the JSON value to a Haystack Number.
fn as_hs_remove_marker(&self) -> Option<RemoveMarker>[src]
fn as_hs_remove_marker(&self) -> Option<RemoveMarker>[src]Convert the JSON value to a Haystack Remove Marker.
fn as_hs_symbol(&self) -> Option<Symbol>[src]
fn as_hs_symbol(&self) -> Option<Symbol>[src]Convert the JSON value to a Haystack Symbol.
fn as_hs_time(&self) -> Option<Time>[src]
fn as_hs_time(&self) -> Option<Time>[src]Convert the JSON value to a Haystack Time.
fn as_hs_xstr(&self) -> Option<Xstr>[src]
fn as_hs_xstr(&self) -> Option<Xstr>[src]Return the Haystack XStr value as a Haystack Xstr.
fn is_hs_coord(&self) -> bool[src]
fn is_hs_coord(&self) -> bool[src]Returns true if the JSON value represents a Haystack Coord.
fn is_hs_date(&self) -> bool[src]
fn is_hs_date(&self) -> bool[src]Returns true if the JSON value represents a Haystack Date.
fn is_hs_date_time(&self) -> bool[src]
fn is_hs_date_time(&self) -> bool[src]Returns true if the JSON value represents a Haystack DateTime.
fn is_hs_marker(&self) -> bool[src]
fn is_hs_marker(&self) -> bool[src]Returns true if the JSON value represents a Haystack marker.
fn is_hs_number(&self) -> bool[src]
fn is_hs_number(&self) -> bool[src]Returns true if the JSON value represents a Haystack Number.
fn is_hs_remove_marker(&self) -> bool[src]
fn is_hs_remove_marker(&self) -> bool[src]Returns true if the JSON value represents a Haystack remove marker.
fn is_hs_symbol(&self) -> bool[src]
fn is_hs_symbol(&self) -> bool[src]Returns true if the JSON value represents a Haystack Symbol.
fn is_hs_time(&self) -> bool[src]
fn is_hs_time(&self) -> bool[src]Returns true if the JSON value represents a Haystack Time.
fn is_hs_xstr(&self) -> bool[src]
fn is_hs_xstr(&self) -> bool[src]Returns true if the JSON value represents a Haystack XStr.