copc-core 0.1.0

Shared COPC metadata, hierarchy, streaming point, and error types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Result;

/// Cancellation hook used by streaming readers and writers.
pub trait CancelCheck {
    fn check(&self) -> Result<()>;
}

/// Cancellation hook that never cancels.
#[derive(Debug, Clone, Copy, Default)]
pub struct NeverCancel;

impl CancelCheck for NeverCancel {
    fn check(&self) -> Result<()> {
        Ok(())
    }
}