pub struct NfsClientPool { /* private fields */ }Expand description
Pool of NFS compound RPC sessions for parallel writes.
Each session has its own TCP connection and NFSv4.1 session ID, enabling true parallel RPCs to the server (one in-flight per session). Rayon threads grab sessions by index (round-robin) to avoid contention.
Implementations§
Source§impl NfsClientPool
impl NfsClientPool
Sourcepub fn new(info: &NfsBypassInfo, pool_size: usize) -> Result<Self, NfsError>
pub fn new(info: &NfsBypassInfo, pool_size: usize) -> Result<Self, NfsError>
Create a pool of pool_size independent NFS sessions.
Sourcepub fn get(&self, idx: usize) -> &Mutex<NfsCompoundClient>
pub fn get(&self, idx: usize) -> &Mutex<NfsCompoundClient>
Get a session by index (round-robin across pool).
Sourcepub fn bypass_info(&self) -> NfsBypassInfo
pub fn bypass_info(&self) -> NfsBypassInfo
Returns the NfsBypassInfo from the first session in the pool.
Auto Trait Implementations§
impl Freeze for NfsClientPool
impl !RefUnwindSafe for NfsClientPool
impl Send for NfsClientPool
impl Sync for NfsClientPool
impl Unpin for NfsClientPool
impl UnsafeUnpin for NfsClientPool
impl UnwindSafe for NfsClientPool
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more