[−][src]Trait raystack::ValueExt
An extension trait for the serde_json::Value
enum,
containing helper functions which make it easier to
parse specific Haystack types from the underlying JSON
value.
Required methods
fn as_hs_coord(&self) -> Option<Coord>
Convert the JSON value to a Haystack Coord.
fn as_hs_date(&self) -> Option<NaiveDate>
Convert the JSON value to a Haystack Date.
fn as_hs_date_time(&self) -> Option<(DateTime<FixedOffset>, &str)>
Convert the JSON value to a tuple containing a DateTime with a fixed timezone offset, and a string containing the Haystack timezone name.
fn as_hs_number(&self) -> Option<Number>
Convert the JSON value to a Haystack Number.
fn as_hs_ref(&self) -> Option<Ref>
Convert the JSON value to a Haystack Ref.
fn as_hs_str(&self) -> Option<&str>
Parse the JSON value as a Haystack Str, removing the "s:" prefix if necessary.
fn as_hs_time(&self) -> Option<NaiveTime>
Convert the JSON value to a Haystack Time.
fn as_hs_uri(&self) -> Option<&str>
Returns the Haystack URI value as a string.
fn as_hs_xstr(&self) -> Option<&str>
Return the Haystack XStr value as a string.
fn is_hs_coord(&self) -> bool
Returns true if the JSON value represents a Haystack Coord.
fn is_hs_date(&self) -> bool
Returns true if the JSON value represents a Haystack Date.
fn is_hs_date_time(&self) -> bool
Returns true if the JSON value represents a Haystack DateTime.
fn is_hs_marker(&self) -> bool
Returns true if the JSON value represents a Haystack marker.
fn is_hs_na(&self) -> bool
Returns true if the JSON value represents a Haystack NA value.
fn is_hs_number(&self) -> bool
Returns true if the JSON value represents a Haystack Number.
fn is_hs_ref(&self) -> bool
Returns true if the JSON value represents a Haystack Ref.
fn is_hs_remove_marker(&self) -> bool
Returns true if the JSON value represents a Haystack remove marker.
fn is_hs_str(&self) -> bool
Returns true if the JSON value represents a Haystack Str.
fn is_hs_time(&self) -> bool
Returns true if the JSON value represents a Haystack Time.
fn is_hs_uri(&self) -> bool
Returns true if the JSON value represents a Haystack URI.
fn is_hs_xstr(&self) -> bool
Returns true if the JSON value represents a Haystack XStr.