pub struct CheckpointBoundaryConstraint { /* private fields */ }Expand description
Legality of computing a span from M to a boundary N and continuing with a nonempty suffix. These constrain span lengths, not absolute token positions. An implementation that additionally requires absolute-position alignment cannot use this contract without a separate, versioned boundary declaration. Plans intersect all declarations; validating only the first span is insufficient.
Implementations§
Source§impl CheckpointBoundaryConstraint
impl CheckpointBoundaryConstraint
pub fn new( prefix: CheckpointTokenSpanConstraint, suffix: CheckpointTokenSpanConstraint, ) -> Result<Self, VNextError>
pub const fn any_positive() -> Self
pub const fn prefix(&self) -> CheckpointTokenSpanConstraint
pub const fn suffix(&self) -> CheckpointTokenSpanConstraint
pub fn permits(&self, prefix_tokens: u64, prompt_tokens: u64) -> bool
Trait Implementations§
Source§impl Clone for CheckpointBoundaryConstraint
impl Clone for CheckpointBoundaryConstraint
Source§fn clone(&self) -> CheckpointBoundaryConstraint
fn clone(&self) -> CheckpointBoundaryConstraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CheckpointBoundaryConstraint
Source§impl Debug for CheckpointBoundaryConstraint
impl Debug for CheckpointBoundaryConstraint
Source§impl<'de> Deserialize<'de> for CheckpointBoundaryConstraint
impl<'de> Deserialize<'de> for CheckpointBoundaryConstraint
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CheckpointBoundaryConstraint
impl StructuralPartialEq for CheckpointBoundaryConstraint
Auto Trait Implementations§
impl Freeze for CheckpointBoundaryConstraint
impl RefUnwindSafe for CheckpointBoundaryConstraint
impl Send for CheckpointBoundaryConstraint
impl Sync for CheckpointBoundaryConstraint
impl Unpin for CheckpointBoundaryConstraint
impl UnsafeUnpin for CheckpointBoundaryConstraint
impl UnwindSafe for CheckpointBoundaryConstraint
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