pub struct DurableEntry {Show 14 fields
pub persistent_id: [u8; 16],
pub create_guid: [u8; 16],
pub rel: String,
pub is_dir: bool,
pub access: u32,
pub options: u32,
pub session_id: u64,
pub owner_user: String,
pub client_guid: [u8; 16],
pub lease_key: Option<[u8; 16]>,
pub lease_state: u32,
pub persistent: bool,
pub timeout: u32,
pub deadline: Instant,
}Expand description
A durable file handle preserved across a connection drop so the client can
reclaim it ([MS-SMB2] §3.3.1.10). Stored as Send metadata; on reconnect
the file is re-opened (single-node model), so no live fd is held here.
Fields§
§persistent_id: [u8; 16]Persistent handle id the client reconnects with (the original FileId).
create_guid: [u8; 16]Client create-guid (v2 handles); zero for v1.
rel: StringShare-relative path to re-open on reconnect.
is_dir: boolWhether the handle was a directory.
access: u32Original desired-access mask, replayed on re-open.
options: u32Original create options, replayed on re-open.
session_id: u64Session that owned the handle.
owner_user: StringUser (SecurityContext) that owns the handle; a reconnect by a different user is rejected with STATUS_ACCESS_DENIED ([MS-SMB2] §3.3.5.9.7).
client_guid: [u8; 16]Client GUID that opened the handle (validated on a lease reconnect).
lease_key: Option<[u8; 16]>Lease key associated with the open, if it held a lease.
lease_state: u32Granted lease state, recreated on a persistent resume ([MS-SMB2] §3.3.5.9.12).
persistent: boolPersistent (survives server restart intent) vs. plain durable.
timeout: u32Requested handle timeout in milliseconds (0 = server default).
deadline: InstantAbsolute expiry after which the preserved handle may be evicted.
Implementations§
Source§impl DurableEntry
impl DurableEntry
Sourcepub fn into_record(self, now_ms: u64) -> HandleRecord
pub fn into_record(self, now_ms: u64) -> HandleRecord
Project into a store record, computing the absolute deadline from
now_ms. Persistent handles get deadline 0 (never swept).
Trait Implementations§
Source§impl Clone for DurableEntry
impl Clone for DurableEntry
Source§fn clone(&self) -> DurableEntry
fn clone(&self) -> DurableEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more