pub struct InputRecord {
pub id: InputId,
pub session_id: Uuid,
pub state: InputState,
pub content: String,
pub fingerprint: u64,
pub rejection_reason: Option<String>,
pub submitted_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Persistent record of an input submission.
Fields§
§id: InputIdUnique input identifier.
session_id: UuidSession this input belongs to.
state: InputStateCurrent state of the input.
content: StringInput content.
fingerprint: u64Fingerprint for deduplication.
rejection_reason: Option<String>Rejection reason (if rejected).
submitted_at: DateTime<Utc>When the input was submitted.
updated_at: DateTime<Utc>When the input was last updated.
Implementations§
Source§impl InputRecord
impl InputRecord
Sourcepub fn new(session_id: Uuid, content: String) -> Self
pub fn new(session_id: Uuid, content: String) -> Self
Creates a new input record in Submitted state.
Sourcepub fn update_state(&mut self, state: InputState)
pub fn update_state(&mut self, state: InputState)
Updates the state and timestamp.
Trait Implementations§
Source§impl Clone for InputRecord
impl Clone for InputRecord
Source§fn clone(&self) -> InputRecord
fn clone(&self) -> InputRecord
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 InputRecord
impl Debug for InputRecord
Source§impl<'de> Deserialize<'de> for InputRecord
impl<'de> Deserialize<'de> for InputRecord
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 InputRecord
impl RefUnwindSafe for InputRecord
impl Send for InputRecord
impl Sync for InputRecord
impl Unpin for InputRecord
impl UnsafeUnpin for InputRecord
impl UnwindSafe for InputRecord
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