pub struct ReimportMappingResult { /* private fields */ }Expand description
One per-mapping terminal import result without source values.
Implementations§
Source§impl ReimportMappingResult
impl ReimportMappingResult
Sourcepub fn new(
class: PortableRecordClass,
symbol: InstallationSymbol,
records: u64,
succeeded: u64,
replayed: u64,
outcome_hash: GeneratedArtifactHash,
) -> Result<ReimportMappingResult, ApplicationPortabilityError>
pub fn new( class: PortableRecordClass, symbol: InstallationSymbol, records: u64, succeeded: u64, replayed: u64, outcome_hash: GeneratedArtifactHash, ) -> Result<ReimportMappingResult, ApplicationPortabilityError>
Records one exact completed mapping result.
Examples found in repository?
examples/generate_portability_fixtures.rs (lines 232-239)
216fn reimport_receipt(
217 manifest: &ApplicationPortabilityManifest,
218 domain: &Domain<'_>,
219 outcome_hash: riffdb_types::GeneratedArtifactHash,
220) -> ApplicationReimportReceipt {
221 ApplicationReimportReceipt::reconcile(
222 manifest,
223 ApplicationExportManifestHash::from_bytes(
224 *hash_generated_artifact(format!("{}-export-v1", domain.name).as_bytes()).as_bytes(),
225 ),
226 database_id(domain.seed),
227 manifest
228 .input()
229 .mappings
230 .iter()
231 .map(|mapping| {
232 ReimportMappingResult::new(
233 mapping.class(),
234 mapping.symbol().clone(),
235 2,
236 2,
237 0,
238 outcome_hash,
239 )
240 .expect("mapping result")
241 })
242 .collect(),
243 manifest
244 .input()
245 .observations
246 .iter()
247 .map(|observation| {
248 ReimportObservationResult::new(
249 observation.name().clone(),
250 observation.expected_hash(),
251 )
252 })
253 .collect(),
254 )
255 .expect("reimport receipt")
256}Sourcepub const fn class(&self) -> PortableRecordClass
pub const fn class(&self) -> PortableRecordClass
Portable record class reconciled by this result.
Sourcepub const fn symbol(&self) -> &InstallationSymbol
pub const fn symbol(&self) -> &InstallationSymbol
Contract symbol reconciled by this result.
Sourcepub const fn outcome_hash(&self) -> GeneratedArtifactHash
pub const fn outcome_hash(&self) -> GeneratedArtifactHash
Stable digest of the persisted command outcomes.
Trait Implementations§
Source§impl Clone for ReimportMappingResult
impl Clone for ReimportMappingResult
Source§fn clone(&self) -> ReimportMappingResult
fn clone(&self) -> ReimportMappingResult
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 ReimportMappingResult
impl Debug for ReimportMappingResult
impl Eq for ReimportMappingResult
Source§impl Ord for ReimportMappingResult
impl Ord for ReimportMappingResult
Source§fn cmp(&self, other: &ReimportMappingResult) -> Ordering
fn cmp(&self, other: &ReimportMappingResult) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ReimportMappingResult
impl PartialEq for ReimportMappingResult
Source§impl PartialOrd for ReimportMappingResult
impl PartialOrd for ReimportMappingResult
impl StructuralPartialEq for ReimportMappingResult
Auto Trait Implementations§
impl Freeze for ReimportMappingResult
impl RefUnwindSafe for ReimportMappingResult
impl Send for ReimportMappingResult
impl Sync for ReimportMappingResult
impl Unpin for ReimportMappingResult
impl UnsafeUnpin for ReimportMappingResult
impl UnwindSafe for ReimportMappingResult
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