#[repr(C, align(64))]pub struct JournalLayout4 {
pub header: LayoutHeader,
pub initialized: IndexbusAtomicU32,
pub pad0: u32,
pub pad_to_64: [u8; 40],
pub pub_pos: IndexbusAtomicU64,
pub pad_pub_pos: [u8; 56],
pub active_segment: IndexbusAtomicU32,
pub pad_active_segment: [u8; 60],
pub segments: [SegmentMeta; 3],
pub sub_pos: [IndexbusAtomicU64; 4],
pub pad_after_sub_pos: [u8; 32],
pub segment_bufs: [[u8; 65536]; 3],
}Expand description
Concrete v1 journal layout:
- 3 segments
- 64KiB per segment
- 4 subscriber positions
This is a new region layout (v1 append-only) and must not reinterpret any existing region.
Fields§
§header: LayoutHeaderCommon region header (magic/version/capabilities/layout size).
initialized: IndexbusAtomicU320 = uninitialized, 1 = initializing, 2 = initialized
pad0: u32Padding (reserved).
pad_to_64: [u8; 40]Pad to 64 so the first counter starts at offset 64.
pub_pos: IndexbusAtomicU64Global publication position (monotonic bytes/records position; interpretation is lane-specific).
pad_pub_pos: [u8; 56]Padding to keep pub_pos in its own cache line.
active_segment: IndexbusAtomicU32Current active segment index (0..3).
pad_active_segment: [u8; 60]Padding to keep active_segment in its own cache line.
segments: [SegmentMeta; 3]Per-segment metadata.
sub_pos: [IndexbusAtomicU64; 4]Per-subscriber positions.
pad_after_sub_pos: [u8; 32]Pad so segment_bufs starts 64B-aligned.
segment_bufs: [[u8; 65536]; 3]Segment buffers (64KiB each).
Implementations§
Source§impl JournalLayout4
impl JournalLayout4
Sourcepub const REQUIRED_CAPS: u32 = caps::INDEXBUS_CAP_SUPPORTS_JOURNAL
pub const REQUIRED_CAPS: u32 = caps::INDEXBUS_CAP_SUPPORTS_JOURNAL
Capabilities required for this region to be considered compatible.
Auto Trait Implementations§
impl !Freeze for JournalLayout4
impl !RefUnwindSafe for JournalLayout4
impl Send for JournalLayout4
impl Sync for JournalLayout4
impl Unpin for JournalLayout4
impl UnwindSafe for JournalLayout4
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