Skip to main content

Crate smb_server_handle_store

Crate smb_server_handle_store 

Source
Expand description

Pluggable store for durable and persistent SMB handles ([MS-SMB2] §3.3.1.10).

A durable/persistent handle survives a client disconnect (and, for the replicated backends, a server node failing over) so the client can reclaim it with DH2C. This crate abstracts where that handle state lives behind one async HandleStore trait so the server code is backend-agnostic:

  • MemStore — in-process, non-durable (single node, dev/tests).
  • RedbStore (feature redb-backend) — embedded durable KV; survives a process restart on one node.
  • Replicated backends (openraft / etcd) plug in behind the same trait for multi-node continuous availability without touching the SMB code.

Only handle lifecycle state lives here (open/close/reclaim/lock), never the file data path — values stay small and writes are infrequent.

Structs§

HandleRecord
Persisted state for one durable/persistent handle.
MemStore
In-process, non-durable store — the default single-node/dev backend.
RedbStore
Durable handle store backed by an embedded redb database file.

Enums§

StoreError
Errors surfaced by a HandleStore backend.

Traits§

HandleStore
Backend-agnostic durable/persistent handle registry.

Type Aliases§

Guid
SMB create GUID identifying a durable handle ([MS-SMB2] §2.2.13.2.3).