MCPcopy Create free account
hub / github.com/andylokandy/arraydeque / Behavior

Interface Behavior

src/behavior.rs:41–41  ·  view source on GitHub ↗

Behavior semantics for `ArrayDeque`. `ArrayDeque` provides two different behaviors, `Saturating` and `Wrapping`, determining whether to remove existing element automatically when pushing to a full deque. The behavior is indicated by a marker type parameter of `ArrayDeque`, which defaults to `Saturating`. ## Saturating Pushing any element when `ArrayDeque` is full will directly return an `Err(C

Source from the content-addressed store, hash-verified

39
40/// Marker trait for indicating behaviors of `ArrayDeque`.
41pub trait Behavior {}
42
43/// Behavior for `ArrayDeque` that specifies saturating write semantics.
44pub struct Saturating;

Callers

nothing calls this directly

Implementers 1

behavior.rssrc/behavior.rs

Calls

no outgoing calls

Tested by

no test coverage detected