pub struct EntryWriteOptions {
pub trusted_unique_payloads: bool,
pub field_name_policy: FieldNamePolicy,
pub seqnum: Option<u64>,
pub boot_id: Option<Uuid>,
}Fields§
§trusted_unique_payloads: boolSkips duplicate DATA reference elimination for this ENTRY.
Set this only when the caller guarantees that the entry contains no
duplicate full KEY=value payloads after field-name policy filtering.
Offset sorting by DATA object offset is always performed regardless of
this flag.
Misuse can write duplicate DATA offsets into one ENTRY object. Keep the
default false unless the producer owns and enforces that invariant.
field_name_policy: FieldNamePolicyField-name validation policy for caller-provided fields.
seqnum: Option<u64>Optional low-level ENTRY seqnum override.
This is for exact journal regeneration and must be monotonically increasing relative to previously written entries. Leave unset for the normal systemd-style auto-incrementing sequence.
boot_id: Option<Uuid>Optional low-level ENTRY boot ID override.
This is for exact journal regeneration of multi-boot files. Leave unset for the normal writer-wide boot ID.
Implementations§
Source§impl EntryWriteOptions
impl EntryWriteOptions
Sourcepub fn trusted_unique_payloads(self, enabled: bool) -> EntryWriteOptions
pub fn trusted_unique_payloads(self, enabled: bool) -> EntryWriteOptions
Enables or disables the trusted unique-payload fast path.
See EntryWriteOptions::trusted_unique_payloads for the caller
invariant required before enabling this option.
Sourcepub fn field_name_policy(self, policy: FieldNamePolicy) -> EntryWriteOptions
pub fn field_name_policy(self, policy: FieldNamePolicy) -> EntryWriteOptions
Selects the field-name validation policy for caller-provided fields.
Sourcepub fn seqnum(self, seqnum: u64) -> EntryWriteOptions
pub fn seqnum(self, seqnum: u64) -> EntryWriteOptions
Uses a caller-provided ENTRY seqnum for this entry.
Sourcepub fn boot_id(self, boot_id: Uuid) -> EntryWriteOptions
pub fn boot_id(self, boot_id: Uuid) -> EntryWriteOptions
Uses a caller-provided ENTRY boot ID for this entry.
Trait Implementations§
Source§impl Clone for EntryWriteOptions
impl Clone for EntryWriteOptions
Source§fn clone(&self) -> EntryWriteOptions
fn clone(&self) -> EntryWriteOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more