Skip to main content

PinSink

Trait PinSink 

Source
pub trait PinSink: Send + Sync {
    // Required methods
    fn pinned(
        &self,
        id: &str,
        journal_id: &str,
        name: Option<&str>,
        cwd: Option<&Path>,
        cache_keepwarm: Option<&str>,
    );
    fn unpinned(&self, id: &str, journal_id: &str);
    fn moved(&self, from: &str, to: &str);
}
Expand description

Where a daemon session writes its pin (daemon::pins::PinBook). The actor calls it exactly when the pin changes, when a pinned session moves to a new journal or is renamed, and when a pinned session is ended on purpose. Implementations do their own I/O and never fail the caller.

Required Methods§

Source

fn pinned( &self, id: &str, journal_id: &str, name: Option<&str>, cwd: Option<&Path>, cache_keepwarm: Option<&str>, )

The session is pinned: add or refresh its entry (journal_id is current; id is the actor id, which may name an older journal). cache_keepwarm: the session’s /keepwarm override (off/auto/<N>h).

Source

fn unpinned(&self, id: &str, journal_id: &str)

Unpinned, or ended on purpose while pinned: drop its entry.

Source

fn moved(&self, from: &str, to: &str)

A pinned session’s journal changed (/clear, a successor compaction, resume): the entry follows it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§