Skip to main content

copc_core/
cancel.rs

1use crate::Result;
2
3/// Cancellation hook used by streaming readers and writers.
4pub trait CancelCheck {
5    fn check(&self) -> Result<()>;
6}
7
8/// Cancellation hook that never cancels.
9#[derive(Debug, Clone, Copy, Default)]
10pub struct NeverCancel;
11
12impl CancelCheck for NeverCancel {
13    fn check(&self) -> Result<()> {
14        Ok(())
15    }
16}