Skip to main content

positioned_at_upper_bound

Function positioned_at_upper_bound 

Source
pub open spec fn positioned_at_upper_bound<Key, Value, Q: ?Sized>(
    model: CursorMutModel<Key, Value>,
    bound: Bound<&Q>,
) -> bool
Expand description
{
    &&& forall |i: int| {
        0 <= i < model.position ==> before_upper_bound(model.keys[i], bound)
    }
    &&& forall |i: int| {
        model.position <= i < model.keys.len()
            ==> !before_upper_bound(model.keys[i], bound)
    }

}

Whether a cursor is at the gap selected by upper_bound_mut.