Skip to main content

DurableEntry

Struct DurableEntry 

Source
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: String

Share-relative path to re-open on reconnect.

§is_dir: bool

Whether the handle was a directory.

§access: u32

Original desired-access mask, replayed on re-open.

§options: u32

Original create options, replayed on re-open.

§session_id: u64

Session that owned the handle.

§owner_user: String

User (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: u32

Granted lease state, recreated on a persistent resume ([MS-SMB2] §3.3.5.9.12).

§persistent: bool

Persistent (survives server restart intent) vs. plain durable.

§timeout: u32

Requested handle timeout in milliseconds (0 = server default).

§deadline: Instant

Absolute expiry after which the preserved handle may be evicted.

Implementations§

Source§

impl DurableEntry

Source

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

Source§

fn clone(&self) -> DurableEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more