pub struct EntryBuilder<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> { /* private fields */ }Expand description
A builder for Entry.
See Entry::builder and Entry::prefilled_builder.
Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> EntryBuilder<MCL, MCC, MPL, N, S, PD>
Sourcepub fn namespace_id(&mut self, value: N) -> &mut Self
pub fn namespace_id(&mut self, value: N) -> &mut Self
Sets the namespace_id of the entry being built.
Sourcepub fn subspace_id(&mut self, value: S) -> &mut Self
pub fn subspace_id(&mut self, value: S) -> &mut Self
Sets the subspace_id of the entry being built.
Sourcepub fn path(&mut self, value: Path<MCL, MCC, MPL>) -> &mut Self
pub fn path(&mut self, value: Path<MCL, MCC, MPL>) -> &mut Self
Sets the path of the entry being built.
Sourcepub fn timestamp<T: Into<Timestamp>>(&mut self, value: T) -> &mut Self
pub fn timestamp<T: Into<Timestamp>>(&mut self, value: T) -> &mut Self
Sets the timestamp of the entry being built.
Sourcepub fn payload_length(&mut self, value: u64) -> &mut Self
pub fn payload_length(&mut self, value: u64) -> &mut Self
Sets the payload_length of the entry being built.
Sourcepub fn payload_digest(&mut self, value: PD) -> &mut Self
pub fn payload_digest(&mut self, value: PD) -> &mut Self
Sets the payload_digest of the entry being built.
Sourcepub fn payload<Payload: AsRef<[u8]>, H, Digest>(
&mut self,
payload: Payload,
) -> &mut Self
pub fn payload<Payload: AsRef<[u8]>, H, Digest>( &mut self, payload: Payload, ) -> &mut Self
Sets the payload_length and payload_digest of the entry being built to those of the given Payload.
The type parameter H is the type of the Hasher which hashes the payload into a payload digest (of type Digest: Into<PD>). Its Default impl provides the initial state of the hasher.
Sourcepub fn now(&mut self) -> Result<&mut Self, HifitimeError>
pub fn now(&mut self) -> Result<&mut Self, HifitimeError>
Sets the timestamp of the entry being built to the current time.
Auto Trait Implementations§
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> !Freeze for EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> RefUnwindSafe for EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Send for EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Sync for EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> Unpin for EntryBuilder<MCL, MCC, MPL, N, S, PD>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S, PD> UnwindSafe for EntryBuilder<MCL, MCC, MPL, N, S, PD>
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