pub struct Queue { /* private fields */ }Expand description
Implementations§
Source§impl Queue
impl Queue
Sourcepub fn new(path: impl Into<PathBuf>) -> QueueBuilder
pub fn new(path: impl Into<PathBuf>) -> QueueBuilder
Creates a new builder for a queue at the given path.
Sourcepub fn writer(&self) -> Result<Writer<'_>>
pub fn writer(&self) -> Result<Writer<'_>>
Creates a writer for appending messages.
§Errors
Returns Error::ReadOnly if opened in read-only mode.
Sourcepub fn roll_cycle(&self) -> &dyn RollCycle
pub fn roll_cycle(&self) -> &dyn RollCycle
Returns the roll cycle configuration.
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Returns the block size.
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Returns whether the queue is read-only.
Sourcepub fn checksums_enabled(&self) -> bool
pub fn checksums_enabled(&self) -> bool
Returns whether CRC-16 checksums are enabled.
Sourcepub fn index_spacing(&self) -> u32
pub fn index_spacing(&self) -> u32
Returns the index spacing.
Sourcepub fn index_count(&self) -> u32
pub fn index_count(&self) -> u32
Returns the index count per array.
Sourcepub fn first_cycle(&self) -> Option<i32>
pub fn first_cycle(&self) -> Option<i32>
Returns the first (oldest) cycle, if any.
Sourcepub fn last_cycle(&self) -> Option<i32>
pub fn last_cycle(&self) -> Option<i32>
Returns the last (newest) cycle, if any.
Sourcepub fn current_cycle(&self) -> i32
pub fn current_cycle(&self) -> i32
Returns the current cycle based on current time.
Sourcepub fn filename_for_cycle(&self, cycle: i32) -> String
pub fn filename_for_cycle(&self, cycle: i32) -> String
Generates the filename for a given cycle.
Auto Trait Implementations§
impl !Freeze for Queue
impl !RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl !UnwindSafe for Queue
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