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

Convert the JSON value to a Haystack Coord.

Convert the JSON value to a Haystack Date.

Convert the JSON value to a Haystack DateTime.

Convert the JSON value to a Haystack Marker.

Convert the JSON value to a Haystack NA.

Convert the JSON value to a Haystack Number.

Convert the JSON value to a Haystack Ref.

Convert the JSON value to a Haystack Remove Marker.

Parse the JSON value as a Haystack Str.

Convert the JSON value to a Haystack Symbol.

Convert the JSON value to a Haystack Time.

Returns the Haystack URI value as a Haystack Uri.

Return the Haystack XStr value as a Haystack Xstr.

Returns true if the JSON value represents a Haystack Coord.

Returns true if the JSON value represents a Haystack Date.

Returns true if the JSON value represents a Haystack DateTime.

Returns true if the JSON value represents a Haystack marker.

Returns true if the JSON value represents a Haystack NA value.

Returns true if the JSON value represents a Haystack Number.

Returns true if the JSON value represents a Haystack Ref.

Returns true if the JSON value represents a Haystack remove marker.

Returns true if the JSON value represents a Haystack Str.

Returns true if the JSON value represents a Haystack Symbol.

Returns true if the JSON value represents a Haystack Time.

Returns true if the JSON value represents a Haystack URI.

Returns true if the JSON value represents a Haystack XStr.

Implementations on Foreign Types

Implementors