pub struct InsuranceCoverage {Show 22 fields
pub coverage_id: CoverageId,
pub asset_id: AssetId,
pub coverage_type: CoverageType,
pub coverage_commitment: [u8; 32],
pub insurer_ref: PartyRef,
pub insured_ref: PartyRef,
pub additional_insureds: Vec<PartyRef>,
pub limit_commitment: [u8; 32],
pub deductible_commitment: Option<[u8; 32]>,
pub premium_commitment: Option<[u8; 32]>,
pub effective_from: Timestamp,
pub expiry: Timestamp,
pub issuer_address: Address,
pub issuer_class: PropertyIssuerClass,
pub policy_id: PolicyId,
pub revocation_ref: Option<[u8; 32]>,
pub status: CoverageStatus,
pub created_at: Timestamp,
pub updated_at: Timestamp,
pub recorded_at_height: BlockHeight,
pub prior_coverage_id: Option<CoverageId>,
pub attachments: Vec<AttachmentRef>,
}Expand description
SRC-864 Insurance Coverage
Fields§
§coverage_id: CoverageIdUnique coverage identifier
asset_id: AssetIdAsset being insured
coverage_type: CoverageTypeCoverage type
coverage_commitment: [u8; 32]BLAKE3 commitment of coverage details
insurer_ref: PartyRefInsurer reference
insured_ref: PartyRefInsured (policyholder) reference
additional_insureds: Vec<PartyRef>Additional insureds
limit_commitment: [u8; 32]Coverage limit commitment
deductible_commitment: Option<[u8; 32]>Deductible commitment
Premium commitment
effective_from: TimestampPolicy effective date
expiry: TimestampPolicy expiry date
issuer_address: AddressIssuer address
issuer_class: PropertyIssuerClassIssuer class
policy_id: PolicyIdPolicy ID (SRC-803)
revocation_ref: Option<[u8; 32]>Revocation reference (SRC-805 compatible)
status: CoverageStatusStatus
created_at: TimestampCreation timestamp
updated_at: TimestampLast update timestamp
recorded_at_height: BlockHeightBlock height when recorded
prior_coverage_id: Option<CoverageId>Prior coverage ID (for renewals)
attachments: Vec<AttachmentRef>Attachments
Implementations§
Source§impl InsuranceCoverage
impl InsuranceCoverage
Sourcepub fn generate_id(
asset_id: &AssetId,
coverage_type: CoverageType,
insurer_ref: &PartyRef,
insured_ref: &PartyRef,
nonce: &[u8; 32],
) -> CoverageId
pub fn generate_id( asset_id: &AssetId, coverage_type: CoverageType, insurer_ref: &PartyRef, insured_ref: &PartyRef, nonce: &[u8; 32], ) -> CoverageId
Generate coverage ID
Sourcepub fn generate_commitment(
policy_terms_hash: &[u8; 32],
limit_commitment: &[u8; 32],
exclusions_hash: Option<&[u8; 32]>,
) -> [u8; 32]
pub fn generate_commitment( policy_terms_hash: &[u8; 32], limit_commitment: &[u8; 32], exclusions_hash: Option<&[u8; 32]>, ) -> [u8; 32]
Generate coverage commitment
Sourcepub fn is_in_force(&self, current_time: Timestamp) -> bool
pub fn is_in_force(&self, current_time: Timestamp) -> bool
Check if coverage is currently in force
Trait Implementations§
Source§impl Clone for InsuranceCoverage
impl Clone for InsuranceCoverage
Source§fn clone(&self) -> InsuranceCoverage
fn clone(&self) -> InsuranceCoverage
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 InsuranceCoverage
impl Debug for InsuranceCoverage
Source§impl<'de> Deserialize<'de> for InsuranceCoverage
impl<'de> Deserialize<'de> for InsuranceCoverage
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 PartialEq for InsuranceCoverage
impl PartialEq for InsuranceCoverage
Source§fn eq(&self, other: &InsuranceCoverage) -> bool
fn eq(&self, other: &InsuranceCoverage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InsuranceCoverage
impl Serialize for InsuranceCoverage
impl Eq for InsuranceCoverage
impl StructuralPartialEq for InsuranceCoverage
Auto Trait Implementations§
impl Freeze for InsuranceCoverage
impl RefUnwindSafe for InsuranceCoverage
impl Send for InsuranceCoverage
impl Sync for InsuranceCoverage
impl Unpin for InsuranceCoverage
impl UnsafeUnpin for InsuranceCoverage
impl UnwindSafe for InsuranceCoverage
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