pub(crate) struct Outlet {
inner: Mutex<Inner>,
changed: Condvar,
}Expand description
Where a connection writes: nowhere yet, the download’s file, or nowhere ever again.
Fields§
§inner: Mutex<Inner>§changed: CondvarImplementations§
Source§impl Outlet
impl Outlet
Sourcepub(crate) fn open(&self, file: File, room: Option<u64>)
pub(crate) fn open(&self, file: File, room: Option<u64>)
Lets the connection write into file, from its current position on, and at most
room bytes when that is known.
Sourcepub(crate) fn close(&self) -> Closed
pub(crate) fn close(&self) -> Closed
Stops the connection writing. Once this returns, the connection won’t write again.
Sourcefn write(&self, bytes: &[u8], id: usize, events: &Sender<Event>) -> Result<Flow>
fn write(&self, bytes: &[u8], id: usize, events: &Sender<Event>) -> Result<Flow>
Writes bytes, or as many as there is room for, once the outlet opens, and tells
events, both before it can close.
fn lock(&self) -> MutexGuard<'_, Inner>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Outlet
impl RefUnwindSafe for Outlet
impl Send for Outlet
impl Sync for Outlet
impl Unpin for Outlet
impl UnsafeUnpin for Outlet
impl UnwindSafe for Outlet
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