[−][src]Struct actyxos_sdk::event::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]
unsafe fn entomb<W: Write>(&self, _write: &mut W) -> Result<()>
[src]
fn extent(&self) -> usize
[src]
unsafe fn exhume<'a, 'b>(
&'a mut self,
bytes: &'b mut [u8]
) -> Option<&'b mut [u8]>
[src]
&'a mut self,
bytes: &'b mut [u8]
) -> Option<&'b mut [u8]>
impl Clone for Payload
[src]
impl Debug for Payload
[src]
impl Default for Payload
[src]
impl<'de> Deserialize<'de> for Payload
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Payload
[src]
impl Ord for Payload
[src]
fn cmp(&self, other: &Payload) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Payload> for Payload
[src]
impl PartialOrd<Payload> for Payload
[src]
fn partial_cmp(&self, other: &Payload) -> Option<Ordering>
[src]
fn lt(&self, other: &Payload) -> bool
[src]
fn le(&self, other: &Payload) -> bool
[src]
fn gt(&self, other: &Payload) -> bool
[src]
fn ge(&self, other: &Payload) -> bool
[src]
impl Serialize for Payload
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
fn lossy_into(self) -> Dst
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,