[][src]Struct actyxos_sdk::event::Payload

pub struct Payload(_);

Compact binary storage of events created when they are received from the Event Service

see Event::extract for supported ways of using the data

Implementations

impl Payload[src]

pub fn from_json_str(s: &str) -> Result<Payload, String>[src]

pub fn compact<T: Serialize>(t: &T) -> Result<Payload, Error>[src]

Construct a new Payload from the supplied serializable value.

pub fn extract<'a, T: Deserialize<'a>>(&'a self) -> Result<T, Error>[src]

Try to lift the desired type from this Payload’s bytes.

pub fn json_value(&self) -> Value[src]

Transform into a generic JSON structure that you can then traverse or query.

pub fn json_string(&self) -> String[src]

Printable representation of this stored object as JSON — the stored Payload bytes are encoded in the CBOR binary format.

pub fn empty() -> Payload[src]

Construct a Payload consisting only of the null value.

pub fn rough_size(&self) -> usize[src]

Rough estimate of the in memory size of the contained opaque value

pub fn from_json_value(v: Value) -> Result<Payload, String>[src]

Only to be used from tests, since it has bad performance due to a serde bug/issue

Trait Implementations

impl Abomonation for Payload[src]

impl Clone for Payload[src]

impl Debug for Payload[src]

impl Default for Payload[src]

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

impl Eq for Payload[src]

impl Ord for Payload[src]

impl PartialEq<Payload> for Payload[src]

impl PartialOrd<Payload> for Payload[src]

impl Serialize for Payload[src]

impl StructuralEq for Payload[src]

impl StructuralPartialEq for Payload[src]

Auto Trait Implementations

impl RefUnwindSafe for Payload

impl Send for Payload

impl Sync for Payload

impl Unpin for Payload

impl UnwindSafe for Payload

Blanket Implementations

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

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

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

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

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

impl<T> From<T> for T[src]

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

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.