pub struct ObligationRequest {
pub source: Option<GovernanceLogId>,
pub kind: ObligationKind,
pub owed_by: OwedBy,
pub until: Option<UntilRequest>,
pub text: String,
pub quote: String,
pub quote_location: String,
pub quote_source: QuoteSource,
pub thread: Option<PostId>,
pub review_note: Option<String>,
}Expand description
A request to append one obligation. See the module docs.
Fields§
§source: Option<GovernanceLogId>The entry that created it; absent or null for a top-level one
kind: ObligationKind§owed_by: OwedBy§until: Option<UntilRequest>Absent or null for an undated, standing duty
text: String§quote: String§quote_location: String§quote_source: QuoteSourceWhere the writer checks quote before signing. Never signed
thread: Option<PostId>§review_note: Option<String>For the reviewer: why the fields are what they are. Never signed
Implementations§
Source§impl ObligationRequest
impl ObligationRequest
Sourcepub fn check_shape(&self) -> Result<(), RequestError>
pub fn check_shape(&self) -> Result<(), RequestError>
Everything checkable without the database: the texts say something, the quote survives normalising, the quote source is well formed, and the deadline is not held.
Sourcepub fn obligation(&self, until: Option<Until>) -> ObligationData
pub fn obligation(&self, until: Option<Until>) -> ObligationData
The data the entry will carry, given the resolved deadline. The
quote source and review note are not part of it.
Trait Implementations§
Source§impl Clone for ObligationRequest
impl Clone for ObligationRequest
Source§impl Debug for ObligationRequest
impl Debug for ObligationRequest
Source§impl<'de> Deserialize<'de> for ObligationRequest
impl<'de> Deserialize<'de> for ObligationRequest
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
Auto Trait Implementations§
impl Freeze for ObligationRequest
impl RefUnwindSafe for ObligationRequest
impl Send for ObligationRequest
impl Sync for ObligationRequest
impl Unpin for ObligationRequest
impl UnsafeUnpin for ObligationRequest
impl UnwindSafe for ObligationRequest
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