pub struct Subscription {
pub subscription_id: String,
pub filter: WatchFilter,
pub callback_url: String,
pub created_at: DateTime<Utc>,
pub status: SubscriptionStatus,
pub secret: Option<String>,
}Expand description
A change-hint subscription (RFC-ACDP-0018 §8.1), CLOSED. Owned by the requester DID that created it.
Fields§
§subscription_id: StringCanonical lowercase v4 UUID.
filter: WatchFilterThe §6 filter hints are sent for.
callback_url: StringWhere hints are POSTed.
created_at: DateTime<Utc>When the subscription was created (canonical millisecond UTC).
status: SubscriptionStatusDelivery state.
secret: Option<String>Base64 of at least 32 random bytes: the ACDP-Signature HMAC key.
Present ONLY in the 201 creation response; never served again.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn from_value(value: &Value) -> Result<Self, AcdpError>
pub fn from_value(value: &Value) -> Result<Self, AcdpError>
Parse and validate a subscription object. Failures are
AcdpError::SchemaViolation.
Sourcepub fn without_secret(&self) -> Self
pub fn without_secret(&self) -> Self
This subscription as GET /subscriptions/{id} serves it: without
secret.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§impl Debug for Subscription
impl Debug for Subscription
Source§impl<'de> Deserialize<'de> for Subscription
impl<'de> Deserialize<'de> for Subscription
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
impl Eq for Subscription
Source§impl PartialEq for Subscription
impl PartialEq for Subscription
Source§impl Serialize for Subscription
impl Serialize for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.