pub struct Writer { /* private fields */ }Expand description
Long-lived WS-driven sync writer. One per machine, coordinated by the
~/.cinch/sync.lock advisory lockfile.
Implementations§
Source§impl Writer
impl Writer
Sourcepub async fn start(
store: Arc<Store>,
client: Arc<RestClient>,
ws_cfg: WsConfig,
lock_path: PathBuf,
kind: LockKind,
) -> Result<Option<Self>>
pub async fn start( store: Arc<Store>, client: Arc<RestClient>, ws_cfg: WsConfig, lock_path: PathBuf, kind: LockKind, ) -> Result<Option<Self>>
Try to start a writer. Returns Ok(None) if another writer already
holds the lock.
The caller must supply a WsConfig (relay URL + bearer token +
optional 32-byte AES key). The same RestClient is used for the
initial REST backfill.
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl UnwindSafe for Writer
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