pub struct Envelope {
pub version: u32,
pub project: String,
pub author: Author,
pub request_key: String,
pub thread_id: String,
pub reply_to: Option<String>,
pub title: String,
pub retention_days: u32,
pub digest: String,
}Fields§
§version: u32§project: String§request_key: String§thread_id: String§reply_to: Option<String>§title: String§retention_days: u32§digest: StringImplementations§
Source§impl Envelope
impl Envelope
pub fn new(project: &str, author: Author, post: &Post) -> Result<Self, String>
pub fn id(&self) -> String
pub fn is_root(&self) -> bool
pub fn source(&self) -> String
pub fn validate_metadata(&self) -> Result<(), String>
pub fn post(&self, body: String) -> Post
pub fn validate(&self, body: &str) -> Result<(), String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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 Envelope
impl StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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.