struct Task {
connections: HashMap<Device, Connection>,
receiver: Receiver<TaskRequest>,
reads: Vec<ReadRequestStorage>,
writes: Vec<WriteRequestStorage>,
streams: Vec<ReadRequestStorage>,
terminate: bool,
timeout: Duration,
congestion_backoff: Duration,
partial_retries: u32,
}Fields§
§connections: HashMap<Device, Connection>§receiver: Receiver<TaskRequest>§reads: Vec<ReadRequestStorage>§writes: Vec<WriteRequestStorage>§streams: Vec<ReadRequestStorage>§terminate: bool§timeout: Duration§congestion_backoff: Duration§partial_retries: u32Implementations§
source§impl Task
impl Task
pub(crate) fn new( read_timeout: Duration, receiver: Receiver<TaskRequest>, congestion_backoff: Duration, partial_retries: u32, ) -> Self
pub(crate) async fn execute(self)
async fn process_reads(&mut self, metrics: &mut Metrics)
async fn process_writes(&mut self, metrics: &mut Metrics)
async fn process_streams(&mut self, metrics: &mut Metrics, generation: u64)
fn try_recv_new_request(&mut self) -> Result<(), TryRecvError>
async fn recv_async_new_request(&mut self) -> Result<(), RecvError>
fn add_new_read_request(&mut self, request: ReadTaskRequest)
fn add_new_write_request(&mut self, request: WriteTaskRequest)
source§impl Task
impl Task
async fn attempt_connection<'a>( connections: &'a mut HashMap<Device, Connection>, destination: &Destination, sender: Either<&Sender<Result<Vec<ReadResponseEntry>, SendError>>, &Sender<Result<Vec<WriteResponseEntry>, SendError>>>, ) -> ConnectionAttempt<'a>
source§impl Task
impl Task
async fn read( storage: &ReadRequestStorage, metrics: &mut Metrics, connection: &mut Connection, timeout: Duration, congestion_backoff: Duration, ) -> Either<ReadPartial, Vec<ReadResponseEntry>>
async fn write( storage: &WriteRequestStorage, metrics: &mut Metrics, connection: &mut Connection, timeout: Duration, congestion_backoff: Duration, ) -> Either<WritePartial, Vec<WriteResponseEntry>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl !RefUnwindSafe for Task
impl Send for Task
impl !Sync for Task
impl Unpin for Task
impl !UnwindSafe for Task
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