pub struct MmapTransportLayout { /* private fields */ }Expand description
Stable file layout for one mmap-backed disruptor transport instance.
Implementations§
Source§impl MmapTransportLayout
impl MmapTransportLayout
Sourcepub fn new(
root_dir: impl Into<PathBuf>,
segment_name: impl Into<String>,
) -> MultiProcessResult<Self>
pub fn new( root_dir: impl Into<PathBuf>, segment_name: impl Into<String>, ) -> MultiProcessResult<Self>
Create a new validated mmap transport layout rooted under root_dir.
Sourcepub fn ensure_directories(&self) -> MultiProcessResult<()>
pub fn ensure_directories(&self) -> MultiProcessResult<()>
Ensure the root and consumer directories exist.
Sourcepub fn ring_config(
&self,
buffer_size: usize,
element_size: usize,
create: bool,
) -> MmapFileConfig
pub fn ring_config( &self, buffer_size: usize, element_size: usize, create: bool, ) -> MmapFileConfig
Build the ring buffer config for this transport.
Sourcepub fn producer_cursor_config(&self, create: bool) -> MmapCursorConfig
pub fn producer_cursor_config(&self, create: bool) -> MmapCursorConfig
Build the producer cursor config for this transport.
Sourcepub fn readiness_cursor_config(&self, create: bool) -> MmapCursorConfig
pub fn readiness_cursor_config(&self, create: bool) -> MmapCursorConfig
Build the readiness cursor config for this transport.
Sourcepub fn consumer_cursor_config(
&self,
consumer_id: &str,
create: bool,
) -> MultiProcessResult<MmapCursorConfig>
pub fn consumer_cursor_config( &self, consumer_id: &str, create: bool, ) -> MultiProcessResult<MmapCursorConfig>
Build a consumer cursor config for the given consumer id.
Sourcepub fn consumer_cursor_path(
&self,
consumer_id: &str,
) -> MultiProcessResult<PathBuf>
pub fn consumer_cursor_path( &self, consumer_id: &str, ) -> MultiProcessResult<PathBuf>
Return the consumer cursor path for a specific consumer id.
Sourcepub fn segment_name(&self) -> &str
pub fn segment_name(&self) -> &str
Return the logical segment name for this layout.
Sourcepub fn producer_cursor_path(&self) -> &Path
pub fn producer_cursor_path(&self) -> &Path
Return the producer cursor mapping path.
Sourcepub fn readiness_cursor_path(&self) -> &Path
pub fn readiness_cursor_path(&self) -> &Path
Return the readiness cursor mapping path.
Sourcepub fn consumers_dir(&self) -> &Path
pub fn consumers_dir(&self) -> &Path
Return the directory holding per-consumer cursor files.
Trait Implementations§
Source§impl Clone for MmapTransportLayout
impl Clone for MmapTransportLayout
Source§fn clone(&self) -> MmapTransportLayout
fn clone(&self) -> MmapTransportLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MmapTransportLayout
impl Debug for MmapTransportLayout
Source§impl PartialEq for MmapTransportLayout
impl PartialEq for MmapTransportLayout
Source§fn eq(&self, other: &MmapTransportLayout) -> bool
fn eq(&self, other: &MmapTransportLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MmapTransportLayout
impl StructuralPartialEq for MmapTransportLayout
Auto Trait Implementations§
impl Freeze for MmapTransportLayout
impl RefUnwindSafe for MmapTransportLayout
impl Send for MmapTransportLayout
impl Sync for MmapTransportLayout
impl Unpin for MmapTransportLayout
impl UnsafeUnpin for MmapTransportLayout
impl UnwindSafe for MmapTransportLayout
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