pub struct HookSnapshot {
pub hook_id: String,
pub token: String,
pub status: HookStatus,
pub metadata: JsonValue,
pub payload: Option<JsonValue>,
}Fields§
§hook_id: String§token: String§status: HookStatus§metadata: JsonValue§payload: Option<JsonValue>Implementations§
Source§impl HookSnapshot
impl HookSnapshot
Sourcepub fn metadata_as<T>(&self) -> Result<T>where
T: DeserializeOwned,
pub fn metadata_as<T>(&self) -> Result<T>where
T: DeserializeOwned,
Decode the persisted hook metadata into a host-defined serde type.
Sourcepub fn payload_as<T>(&self) -> Result<Option<T>>where
T: DeserializeOwned,
pub fn payload_as<T>(&self) -> Result<Option<T>>where
T: DeserializeOwned,
Decode the received hook payload into a host-defined serde type.
Trait Implementations§
Source§impl Clone for HookSnapshot
impl Clone for HookSnapshot
Source§fn clone(&self) -> HookSnapshot
fn clone(&self) -> HookSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HookSnapshot
impl Debug for HookSnapshot
Source§impl<'de> Deserialize<'de> for HookSnapshot
impl<'de> Deserialize<'de> for HookSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HookSnapshot
impl PartialEq for HookSnapshot
Source§fn eq(&self, other: &HookSnapshot) -> bool
fn eq(&self, other: &HookSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HookSnapshot
impl Serialize for HookSnapshot
impl StructuralPartialEq for HookSnapshot
Auto Trait Implementations§
impl Freeze for HookSnapshot
impl RefUnwindSafe for HookSnapshot
impl Send for HookSnapshot
impl Sync for HookSnapshot
impl Unpin for HookSnapshot
impl UnsafeUnpin for HookSnapshot
impl UnwindSafe for HookSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more