func (r Ring) ForcePush() uint {
	if r.full() {
		_, _ = r.Shift()
	}
	i, _ := r.Push()
	return i
}
ForcePush forces a new element onto the ring, discarding the oldest
element if the ring is full. It returns the index of the inserted
element.

Using ForcePush to insert into the Ring means the Ring will lose
data that has not been consumed yet. This is fine under some
circumstances, but can have disastrous consequences for code that
expects to read consistent data. It is generally safer to use .Push
and handle ErrFull explicitly.
package o
import "math/bits"
type fullErr uint
func (e fullErr) Error() string {
	return "inserting into a full ring"
}
type emptyErr uint
func (e emptyErr) Error() string {
	return "reading from an empty ring"
}
const ErrEmpty emptyErr = iota
const ErrFull fullErr = iota
type Ring struct {
	ringBackend
}
type ringBackend interface {
	full() bool
	empty() bool
	size() uint
	mask(uint) uint
	start() uint
	end() uint
	capacity() uint
	reset()
	pushN(n uint) (start uint, end uint, err error)
	shiftN(n uint) (start uint, end uint, err error)
}
func (r Ring) Capacity() uint {
	return r.capacity()
}
func (r Ring) Empty() bool {
	return r.empty()
}