pub struct PinnedRecords { /* private fields */ }Expand description
A RecordSnapshot shared between the functions that run over it, with its
content hash taken once. Every FunctionCtx built from it holds the same
records (no clone per run) and the same hash (no re-hash per run).
Implementations§
Source§impl PinnedRecords
impl PinnedRecords
Sourcepub fn new(records: RecordSnapshot) -> Self
pub fn new(records: RecordSnapshot) -> Self
Pin records, hashing them once.
Sourcepub fn records(&self) -> &RecordSnapshot
pub fn records(&self) -> &RecordSnapshot
The records.
Sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Content hash of the records (what FunctionCtx::snapshot_hash reports).
Trait Implementations§
Source§impl Clone for PinnedRecords
impl Clone for PinnedRecords
Auto Trait Implementations§
impl Forget for PinnedRecords
impl Freeze for PinnedRecords
impl RefUnwindSafe for PinnedRecords
impl Send for PinnedRecords
impl Sync for PinnedRecords
impl Unpin for PinnedRecords
impl UnsafeUnpin for PinnedRecords
impl UnwindSafe for PinnedRecords
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more