pub struct ChunkGeometry { /* private fields */ }Expand description
Physical payload geometry available to one exchange direction.
Runtime policy chooses how many slots one publication should span. The
resulting chunk capacity is always an exact multiple of the physical slot
payload size: slots * slot_payload_bytes.
Implementations§
Source§impl ChunkGeometry
impl ChunkGeometry
pub const fn new( slot_payload_bytes: usize, slots_per_lane: usize, ) -> Option<Self>
Sourcepub const fn slot_payload_bytes(self) -> usize
pub const fn slot_payload_bytes(self) -> usize
Usable payload bytes in one physical slot. Slot metadata lives outside this capacity.
Sourcepub const fn slots_per_lane(self) -> usize
pub const fn slots_per_lane(self) -> usize
Maximum slots one publication may reserve from this node’s lane.
Sourcepub const fn chunk_bytes(self, slots: usize) -> Option<usize>
pub const fn chunk_bytes(self, slots: usize) -> Option<usize>
Exact publication capacity for a runtime-selected slot count.
Sourcepub const fn slots_for_target(self, target_bytes: usize) -> Option<usize>
pub const fn slots_for_target(self, target_bytes: usize) -> Option<usize>
Convert a byte target into a valid runtime slot count. The target is rounded down to whole slots, but never below one slot, and clamped to the node lane.
Sourcepub const fn chunk_bytes_for_target(self, target_bytes: usize) -> Option<usize>
pub const fn chunk_bytes_for_target(self, target_bytes: usize) -> Option<usize>
Effective chunk capacity for a runtime byte target. This is always
n * slot_payload_bytes for a valid lane-bounded n.
Trait Implementations§
Source§impl Clone for ChunkGeometry
impl Clone for ChunkGeometry
impl Copy for ChunkGeometry
Source§impl Debug for ChunkGeometry
impl Debug for ChunkGeometry
impl Eq for ChunkGeometry
Source§impl Hash for ChunkGeometry
impl Hash for ChunkGeometry
Source§impl PartialEq for ChunkGeometry
impl PartialEq for ChunkGeometry
impl StructuralPartialEq for ChunkGeometry
Auto Trait Implementations§
impl Forget for ChunkGeometry
impl Freeze for ChunkGeometry
impl RefUnwindSafe for ChunkGeometry
impl Send for ChunkGeometry
impl Sync for ChunkGeometry
impl Unpin for ChunkGeometry
impl UnsafeUnpin for ChunkGeometry
impl UnwindSafe for ChunkGeometry
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