pub struct WorkerSender<T> {
inner: Sender<T>,
worker_id: u32,
hostname: String,
status: Arc<Mutex<WorkerStatus>>,
unicast_v4: Option<Address>,
unicast_v6: Option<Address>,
}
Expand description
Special Sender struct for workers that sends tasks after a delay (based on the Worker interval).
§Fields
- inner - the inner sender that connects to the worker
- worker_id - the unique ID of the worker
- hostname - the hostname of the worker
- status - the status of the worker, used to determine if it is connected or not
- unicast_v4 - the unicast IPv4 address of the worker, if available
- unicast_v6 - the unicast IPv6 address of the worker, if available
Fields§
§inner: Sender<T>
§worker_id: u32
§hostname: String
§status: Arc<Mutex<WorkerStatus>>
§unicast_v4: Option<Address>
§unicast_v6: Option<Address>
Implementations§
Source§impl<T> WorkerSender<T>
impl<T> WorkerSender<T>
Trait Implementations§
Source§impl<T: Clone> Clone for WorkerSender<T>
impl<T: Clone> Clone for WorkerSender<T>
Source§fn clone(&self) -> WorkerSender<T>
fn clone(&self) -> WorkerSender<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for WorkerSender<T>
impl<T> RefUnwindSafe for WorkerSender<T>
impl<T> Send for WorkerSender<T>where
T: Send,
impl<T> Sync for WorkerSender<T>where
T: Send,
impl<T> Unpin for WorkerSender<T>
impl<T> UnwindSafe for WorkerSender<T>
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,
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered
].