Skip to main content

PackContext

Struct PackContext 

Source
pub struct PackContext<'a> {
    pub cap_bytes: u64,
    pub stamp: Option<ClockStamp>,
    pub net_notice: bool,
    pub steer: Option<(String, String)>,
    pub reminder: Option<ContextReminder>,
    pub offload: Option<OffloadSite<'a>>,
    pub sieve: Option<SieveRequest<'a>>,
    pub adviser: Option<Consultation>,
}
Expand description

Everything one packaging decision needs; all injected, nothing sampled.

Fields§

§cap_bytes: u64

This result’s byte budget, derived by the caller from window remainder. OFFLOAD_MIN_BYTES is a floor for offloading, not a threshold: smaller oversized results truncate plainly.

§stamp: Option<ClockStamp>§net_notice: bool§steer: Option<(String, String)>§reminder: Option<ContextReminder>

The fourth attachment: how full the window is, when a threshold was crossed. The sentence is ContextReminder::render’s.

§offload: Option<OffloadSite<'a>>§sieve: Option<SieveRequest<'a>>

Present for exec results only. Without an offload site there is no tee, and without a tee the sieve does not cut.

§adviser: Option<Consultation>

The window’s adviser, consulted before this call: its answer may adjust the budget or take the result out of the window, and its two ledger lines ride Packaged::events whether it answered or fell back. None means nobody asked, which is not the same as a fallback and is not recorded as one.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for PackContext<'a>

§

impl<'a> !Sync for PackContext<'a>

§

impl<'a> !UnwindSafe for PackContext<'a>

§

impl<'a> Freeze for PackContext<'a>

§

impl<'a> Send for PackContext<'a>

§

impl<'a> Unpin for PackContext<'a>

§

impl<'a> UnsafeUnpin for PackContext<'a>

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, 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, 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.