[][src]Struct holochain_core_types::json::JsonString

pub struct JsonString(_);

track json serialization with the rust type system! JsonString wraps a string containing JSON serialized data avoid accidental double-serialization or forgetting to serialize serialize any type consistently including hard-to-reach places like Option and Result JsonString must not itself be serialized/deserialized instead, implement and use the native From trait to move between types

Methods

impl JsonString[src]

pub fn null() -> JsonString[src]

a null JSON value e.g. represents None when implementing From<Option>

pub fn empty_object() -> JsonString[src]

pub fn is_null(&self) -> bool[src]

pub fn to_bytes(&self) -> Vec<u8>[src]

achieves the same outcome as serde_json::to_vec()

pub fn from_json(s: &str) -> JsonString[src]

Trait Implementations

impl PartialEq<JsonString> for JsonString[src]

impl<'a> From<&'a ChainHeader> for JsonString[src]

impl From<ChainHeader> for JsonString[src]

impl<'a> From<&'a CrudStatus> for JsonString[src]

impl From<CrudStatus> for JsonString[src]

impl<'a> From<&'a Attribute> for JsonString[src]

impl From<Attribute> for JsonString[src]

impl<'a> From<&'a EntityAttributeValueIndex> for JsonString[src]

impl From<EntityAttributeValueIndex> for JsonString[src]

impl<'a> From<&'a CapToken> for JsonString[src]

impl From<CapToken> for JsonString[src]

impl<'a> From<&'a CapTokenGrant> for JsonString[src]

impl From<CapTokenGrant> for JsonString[src]

impl<'a> From<&'a DeletionEntry> for JsonString[src]

impl From<DeletionEntry> for JsonString[src]

impl<'a> From<&'a AppEntryType> for JsonString[src]

impl From<AppEntryType> for JsonString[src]

impl<'a> From<&'a EntryType> for JsonString[src]

impl From<EntryType> for JsonString[src]

impl<'a> From<&'a Entry> for JsonString[src]

impl From<Entry> for JsonString[src]

impl From<Option<Entry>> for JsonString[src]

impl<'a> From<&'a EntryWithMeta> for JsonString[src]

impl From<EntryWithMeta> for JsonString[src]

impl<'a> From<&'a EntryWithMetaAndHeader> for JsonString[src]

impl From<EntryWithMetaAndHeader> for JsonString[src]

impl From<RibosomeEncodedValue> for JsonString[src]

impl<'a> From<&'a RibosomeErrorCode> for JsonString[src]

impl From<RibosomeErrorCode> for JsonString[src]

impl<'a> From<&'a CoreError> for JsonString[src]

impl From<CoreError> for JsonString[src]

impl<'a> From<&'a HolochainError> for JsonString[src]

impl From<HolochainError> for JsonString[src]

impl<'a> From<&'a ZomeApiInternalResult> for JsonString[src]

impl From<ZomeApiInternalResult> for JsonString[src]

impl<'a> From<&'a AgentId> for JsonString[src]

impl From<AgentId> for JsonString[src]

impl<'a> From<&'a EntryTypeDef> for JsonString[src]

impl From<EntryTypeDef> for JsonString[src]

impl<'a> From<&'a Zome> for JsonString[src]

impl From<Zome> for JsonString[src]

impl<'a> From<&'a Dna> for JsonString[src]

impl From<Dna> for JsonString[src]

impl<'a> From<&'a HashString> for JsonString[src]

impl From<HashString> for JsonString[src]

impl From<bool> for JsonString[src]

impl From<u32> for JsonString[src]

impl From<i32> for JsonString[src]

impl From<u64> for JsonString[src]

impl From<u128> for JsonString[src]

impl From<Value> for JsonString[src]

impl From<JsonString> for String[src]

impl<'a> From<&'a JsonString> for &'a str[src]

impl<'a> From<&'a JsonString> for String[src]

impl From<&'static str> for JsonString[src]

impl<T: Serialize> From<Vec<T>> for JsonString[src]

impl<T: Into<JsonString>, E: Into<JsonString> + JsonError> From<Result<T, E>> for JsonString[src]

impl<T: Into<JsonString>> From<Result<T, String>> for JsonString[src]

impl<E: Into<JsonString>> From<Result<String, E>> for JsonString[src]

impl From<Result<String, String>> for JsonString[src]

impl From<()> for JsonString[src]

impl From<RawString> for JsonString[src]

it should always be possible to Jsonify RawString, if not something is very wrong

impl<'a> From<&'a LinkData> for JsonString[src]

impl From<LinkData> for JsonString[src]

impl<'a> From<&'a LinkList> for JsonString[src]

impl From<LinkList> for JsonString[src]

impl<'a> From<&'a Link> for JsonString[src]

impl From<Link> for JsonString[src]

impl<'a> From<&'a Provenance> for JsonString[src]

impl From<Provenance> for JsonString[src]

impl<'a> From<&'a Signature> for JsonString[src]

impl From<Signature> for JsonString[src]

impl<'a> From<&'a Timeout> for JsonString[src]

impl From<Timeout> for JsonString[src]

impl<'a> From<&'a Period> for JsonString[src]

impl From<Period> for JsonString[src]

impl<'a> From<&'a Iso8601> for JsonString[src]

impl From<Iso8601> for JsonString[src]

impl<'a> From<&'a ValidationPackage> for JsonString[src]

impl From<ValidationPackage> for JsonString[src]

impl<'a> From<&'a ValidationPackageDefinition> for JsonString[src]

impl From<ValidationPackageDefinition> for JsonString[src]

impl Clone for JsonString[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for JsonString[src]

impl Debug for JsonString[src]

impl Display for JsonString[src]

impl Hash for JsonString[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> TryFrom<&'a JsonString> for ChainHeader[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ChainHeader[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for CrudStatus[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for CrudStatus[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Attribute[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Attribute[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for EntityAttributeValueIndex[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for EntityAttributeValueIndex[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for CapToken[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for CapToken[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for CapTokenGrant[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for CapTokenGrant[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for DeletionEntry[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for DeletionEntry[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for AppEntryType[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for AppEntryType[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for EntryType[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for EntryType[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Entry[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Entry[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Option<Entry>[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for EntryWithMeta[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for EntryWithMeta[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for EntryWithMetaAndHeader[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for EntryWithMetaAndHeader[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for RibosomeEncodedValue[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for RibosomeErrorCode[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for RibosomeErrorCode[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for CoreError[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for CoreError[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for HolochainError[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for HolochainError[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for ZomeApiInternalResult[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ZomeApiInternalResult[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for AgentId[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for AgentId[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for EntryTypeDef[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for EntryTypeDef[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Zome[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Zome[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Dna[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Dna[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for HashString[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for HashString[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Vec<HashString>[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for bool[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for u32[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for u64[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ()[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for RawString[src]

converting a JsonString to RawString can fail if the JsonString is not a serialized string

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for LinkData[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for LinkData[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for LinkList[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for LinkList[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Link[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Link[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Provenance[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Provenance[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Signature[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Signature[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Timeout[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Timeout[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Period[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Period[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for Iso8601[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for Iso8601[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for ValidationPackage[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ValidationPackage[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a JsonString> for ValidationPackageDefinition[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl TryFrom<JsonString> for ValidationPackageDefinition[src]

type Error = HolochainError

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl Serialize for JsonString[src]

impl<'de> Deserialize<'de> for JsonString[src]

Auto Trait Implementations

impl Send for JsonString

impl Sync for JsonString

Blanket Implementations

impl<T> From for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Clone for T where
    T: Clone
[src]