pub struct DraftView<'a> {
pub created_at: Datetime,
pub draft: Draft<'a>,
pub id: Tid,
pub updated_at: Datetime,
pub extra_data: Option<BTreeMap<SmolStr, Data<'a>>>,
}Expand description
View to present drafts data to users.
Fields§
§created_at: DatetimeThe time the draft was created.
draft: Draft<'a>§id: TidA TID to be used as a draft identifier.
updated_at: DatetimeThe time the draft was last updated.
extra_data: Option<BTreeMap<SmolStr, Data<'a>>>Implementations§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for DraftView<'a>
impl<'de: 'a, 'a> Deserialize<'de> for DraftView<'a>
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<'a> IntoStatic for DraftView<'a>
impl<'a> IntoStatic for DraftView<'a>
Source§impl<'a> LexiconSchema for DraftView<'a>
impl<'a> LexiconSchema for DraftView<'a>
Source§fn lexicon_doc() -> LexiconDoc<'static>
fn lexicon_doc() -> LexiconDoc<'static>
Generate the lexicon document for this type Read more
Source§fn validate(&self) -> Result<(), ConstraintError>
fn validate(&self) -> Result<(), ConstraintError>
Validate an instance against lexicon constraints Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether this type should be inlined vs referenced Read more
impl<'a> Eq for DraftView<'a>
impl<'a> StructuralPartialEq for DraftView<'a>
Auto Trait Implementations§
impl<'a> Freeze for DraftView<'a>
impl<'a> RefUnwindSafe for DraftView<'a>
impl<'a> Send for DraftView<'a>
impl<'a> Sync for DraftView<'a>
impl<'a> Unpin for DraftView<'a>
impl<'a> UnsafeUnpin for DraftView<'a>
impl<'a> UnwindSafe for DraftView<'a>
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,
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.