Skip to main content

SenderCore

Struct SenderCore 

Source
pub struct SenderCore { /* private fields */ }
Expand description

A destination’s single packet scheduler and retained recovery state.

now always belongs to the same local RobotClock. The caller owns transport and wakeups; this core neither reads a global clock nor sleeps. Runtime objects are never retained here. Optional feedback can later request the same retained jobs through request_recovery, without bypassing this scheduler’s budget.

Implementations§

Source§

impl SenderCore

Source

pub fn set_repair_interval(&mut self, every: u16) -> Result<()>

Changes only future repair scheduling; retained packets and budgets are untouched.

Source

pub fn new( config: LogStreamSenderConfig, now: CuTime, reserved_bytes: usize, ) -> Result<Self>

Validate all storage arithmetic before allocating. reserved_bytes covers the driver’s owned-record pool, which shares the destination budget.

Source

pub const fn stats(&self) -> SenderStats

Source

pub fn accept_record(&mut self, record: &[u8], now: CuTime) -> Result<()>

Admit an already encoded record from a bounded worker buffer. No borrow escapes this call. CL packets shed on overflow; retained recovery replaces only a complete matching boundary/keyframe pair.

Source

pub fn request_recovery(&mut self)

Coalesced request for retained bootstrap data. Future advisory feedback uses this same operation; it grants neither extra bandwidth nor retention.

Source

pub fn begin_shutdown(&mut self)

Disable periodic work. The driver enforces the finite shutdown deadline.

Source

pub fn discard_pending(&mut self)

Account for work abandoned at the driver’s finite shutdown deadline.

Source

pub fn is_idle(&self) -> bool

Source

pub fn poll<T: CuStreamTx>( &mut self, now: CuTime, transport: &mut T, ) -> Result<Option<CuTime>>

Send a bounded amount of eligible work and return the next local deadline. Carrier WouldBlock consumes the attempt’s budget and drops the packet.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetTypeRegistration for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PayloadDefaultHandlePolicyApply for T
where T: ?Sized,

Source§

impl<T> PayloadDefaultLoggingPolicy for T
where T: ?Sized,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Reflect for T
where T: 'static,

Source§

impl<T> ReflectTypePath for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.