pub struct SharedData<Buffer, Q, Auxiliary = ()>(/* private fields */);
Expand description
SharedData contains both the writer and the responses because:
- The overhead of
Arc
and a separate allocation; - If the write end of a connection is closed, then openssh implementation of sftp-server would close the read end right away, discarding any unsent but processed or unprocessed responses.
Implementations§
pub fn queue(&self) -> &Q
Sourcepub fn get_auxiliary(&self) -> &Auxiliary
pub fn get_auxiliary(&self) -> &Auxiliary
Returned the auxiliary data.
Sourcepub fn create_response_id(&self) -> Id<Buffer>
pub fn create_response_id(&self) -> Id<Buffer>
Create a useable response id.
Sourcepub fn try_reserve_id(&self, new_id_cnt: u32) -> bool
pub fn try_reserve_id(&self, new_id_cnt: u32) -> bool
Return true if reserve succeeds, false otherwise.
Sourcepub fn reserve_id(&self, new_id_cnt: u32)
pub fn reserve_id(&self, new_id_cnt: u32)
Return true if reserve succeeds, false otherwise.
Trait Implementations§
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)