pub struct Queue {
pub dropped: u64,
/* private fields */
}Fields§
§dropped: u64Cumulative dropped count (in-memory or on-disk FIFO eviction).
Implementations§
Source§impl Queue
impl Queue
pub fn open(dir: PathBuf) -> Result<Self>
Sourcepub fn append(&mut self, r: &Record) -> Result<bool>
pub fn append(&mut self, r: &Record) -> Result<bool>
Append and return true if a roll happened (current segment was closed).
Sourcepub fn force_roll(&mut self) -> Result<Option<PathBuf>>
pub fn force_roll(&mut self) -> Result<Option<PathBuf>>
Force roll even if segment isn’t full (used on tick flush).
Returns Ok(None) if nothing to roll.
Sourcepub fn ready_segments_sorted(&self) -> Result<Vec<PathBuf>>
pub fn ready_segments_sorted(&self) -> Result<Vec<PathBuf>>
Closed, immutable segments ready to be sent.
pub fn segments_sorted(&self) -> Result<Vec<PathBuf>>
pub fn claim_oldest_segment(&self) -> Result<Option<PathBuf>>
pub fn complete_claim(&self, path: &Path) -> Result<()>
pub fn restore_claim(&self, path: &Path) -> Result<Option<PathBuf>>
pub fn delete(&self, path: &Path) -> Result<()>
pub fn stats(&self) -> Result<QueueStats>
Auto Trait Implementations§
impl Freeze for Queue
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnsafeUnpin 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