pub struct DevicePrimaryTestOnly {
pub store: Arc<Store>,
pub journal: DeviceJournalTestOnly,
pub issuance: DeviceIssuanceTestOnly,
/* private fields */
}Expand description
The primary of the single-device offline profile (Go
DevicePrimaryTestOnly). TEST ONLY.
Fields§
§store: Arc<Store>§journal: DeviceJournalTestOnly§issuance: DeviceIssuanceTestOnlyImplementations§
Source§impl DevicePrimaryTestOnly
impl DevicePrimaryTestOnly
Sourcepub fn new(store: Arc<Store>, replay_epoch: i64) -> V2Result<Self>
pub fn new(store: Arc<Store>, replay_epoch: i64) -> V2Result<Self>
Go NewDevicePrimaryTestOnly: wrap store with an empty anchored
journal store and an empty issuance store, serving replay_epoch.
Sourcepub fn clone_primary(&self) -> Self
pub fn clone_primary(&self) -> Self
Go Clone: copy the complete primary state, modelling a backup or
snapshot. The copy is not bound to any component.
Sourcepub fn complete_state_digest_test_only(&self) -> V2Result<Vec<u8>>
pub fn complete_state_digest_test_only(&self) -> V2Result<Vec<u8>>
Go CompleteStateDigestTestOnly.
Sourcepub fn projection_test_only(&self) -> V2Result<DeviceStateProjectionTestOnly>
pub fn projection_test_only(&self) -> V2Result<DeviceStateProjectionTestOnly>
The §7.13 projection of the primary’s current records: the canonical bytes of every member, the projection object, and the complete-state digest.
Sourcepub fn from_records_test_only(state_json: &[u8]) -> V2Result<Self>
pub fn from_records_test_only(state_json: &[u8]) -> V2Result<Self>
A primary holding exactly the records of one state object of
testvectors/v2/device-state.json (the §7.13 record encodings, with
sealed bytes as terminal_b64, receipt_body_b64, body_b64, and
snapshot_b64).
Trait Implementations§
Auto Trait Implementations§
impl Forget for DevicePrimaryTestOnly
impl Freeze for DevicePrimaryTestOnly
impl RefUnwindSafe for DevicePrimaryTestOnly
impl Send for DevicePrimaryTestOnly
impl Sync for DevicePrimaryTestOnly
impl Unpin for DevicePrimaryTestOnly
impl UnsafeUnpin for DevicePrimaryTestOnly
impl UnwindSafe for DevicePrimaryTestOnly
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