pub struct FlightLeader { /* private fields */ }Expand description
Handle for the leader task that will execute the query and broadcast results.
If the leader is dropped without calling complete() (e.g., the task panics),
the Drop impl removes the key from the in-flight map so new requests don’t
join a dead channel. Followers on the dead channel receive a RecvError from
the broadcast receiver, which surfaces as a query error.
Implementations§
Source§impl FlightLeader
impl FlightLeader
Sourcepub fn complete(
self,
sf: &Singleflight,
result: Arc<Result<Arc<OwnedResultSnapshot>, BsqlError>>,
)
pub fn complete( self, sf: &Singleflight, result: Arc<Result<Arc<OwnedResultSnapshot>, BsqlError>>, )
Broadcast the result to all waiting followers and remove from in-flight map.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlightLeader
impl RefUnwindSafe for FlightLeader
impl Send for FlightLeader
impl Sync for FlightLeader
impl Unpin for FlightLeader
impl UnsafeUnpin for FlightLeader
impl UnwindSafe for FlightLeader
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