Skip to main content

Entry

Trait Entry 

Source
pub trait Entry:
    Clone
    + Serialize
    + Send
    + Sync
    + 'static
    + Sealed {
    type Selection: Send + Sync;

    // Required methods
    fn position(&self) -> &StorageCursor;
    fn matches(&self, selection: &Self::Selection) -> bool;
    fn pending(queued: Queued<'_>) -> &[Self];
    fn scan<'a>(
        backend: &'a (dyn StorageBackend + 'static),
        snapshot: &'a BackendSnapshot,
        selection: &'a Self::Selection,
        page: ScanPage,
        memory: RetainedMemory,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, Error>> + Send + 'a>>;

    // Provided method
    fn start(_selection: &Self::Selection) -> u64 { ... }
}

Required Associated Types§

Required Methods§

Source

fn position(&self) -> &StorageCursor

Source

fn matches(&self, selection: &Self::Selection) -> bool

Source

fn pending(queued: Queued<'_>) -> &[Self]

Source

fn scan<'a>( backend: &'a (dyn StorageBackend + 'static), snapshot: &'a BackendSnapshot, selection: &'a Self::Selection, page: ScanPage, memory: RetainedMemory, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self>, Error>> + Send + 'a>>

Provided Methods§

Source

fn start(_selection: &Self::Selection) -> u64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§