pub struct Inspection {Show 14 fields
pub id: Uuid,
pub inspection_number: String,
pub inspection_type: InspectionType,
pub reference_type: String,
pub reference_id: Uuid,
pub status: InspectionStatus,
pub inspector_id: Option<String>,
pub scheduled_at: Option<DateTime<Utc>>,
pub started_at: Option<DateTime<Utc>>,
pub completed_at: Option<DateTime<Utc>>,
pub notes: Option<String>,
pub items: Vec<InspectionItem>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Quality inspection for goods
Fields§
§id: Uuid§inspection_number: String§inspection_type: InspectionType§reference_type: String§reference_id: Uuid§status: InspectionStatus§inspector_id: Option<String>§scheduled_at: Option<DateTime<Utc>>§started_at: Option<DateTime<Utc>>§completed_at: Option<DateTime<Utc>>§notes: Option<String>§items: Vec<InspectionItem>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl Inspection
impl Inspection
Sourcepub const fn can_complete(&self) -> bool
pub const fn can_complete(&self) -> bool
Check if inspection can be completed
Sourcepub fn all_items_inspected(&self) -> bool
pub fn all_items_inspected(&self) -> bool
Check if all items have been inspected
Sourcepub fn calculate_overall_result(&self) -> InspectionStatus
pub fn calculate_overall_result(&self) -> InspectionStatus
Calculate overall result based on items
Trait Implementations§
Source§impl Clone for Inspection
impl Clone for Inspection
Source§fn clone(&self) -> Inspection
fn clone(&self) -> Inspection
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 Inspection
impl Debug for Inspection
Source§impl<'de> Deserialize<'de> for Inspection
impl<'de> Deserialize<'de> for Inspection
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Inspection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Inspection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Inspection
Source§impl PartialEq for Inspection
impl PartialEq for Inspection
Source§impl Serialize for Inspection
impl Serialize for Inspection
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Inspection
Auto Trait Implementations§
impl Freeze for Inspection
impl RefUnwindSafe for Inspection
impl Send for Inspection
impl Sync for Inspection
impl Unpin for Inspection
impl UnsafeUnpin for Inspection
impl UnwindSafe for Inspection
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