pub struct LogId(/* private fields */);Expand description
Identity of a logical log.
A database may declare a LogId, which is written into every sector header.
This is what lets a device tell its own removable medium from someone
else’s: mounting a volume whose sectors carry a different id fails with
Error::ForeignVolume instead of treating the
sectors as free space and erasing them.
A replica carries the id of the log it replicates, not an identity of its own — the medium is a copy of exactly one log.
Backed by NonZeroU32 so Option<LogId> is four bytes and “unset” is
unrepresentable in the typed API. Zero on the wire means anonymous, which
matches any configuration.
Implementations§
Trait Implementations§
impl Copy for LogId
impl Eq for LogId
Source§impl Ord for LogId
impl Ord for LogId
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 PartialOrd for LogId
impl PartialOrd for LogId
impl StructuralPartialEq for LogId
Auto Trait Implementations§
impl Freeze for LogId
impl RefUnwindSafe for LogId
impl Send for LogId
impl Sync for LogId
impl Unpin for LogId
impl UnsafeUnpin for LogId
impl UnwindSafe for LogId
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