pub struct BTreeMapNonEmpty<K, V>(/* private fields */);Expand description
A BTreeMap that is guaranteed to be non-empty.
Implementations§
Source§impl<K, V> BTreeMapNonEmpty<K, V>
impl<K, V> BTreeMapNonEmpty<K, V>
Sourcepub fn new(map: BTreeMap<K, V>) -> Result<Self, ValidationError>
pub fn new(map: BTreeMap<K, V>) -> Result<Self, ValidationError>
Create a new BTreeMapNonEmpty, validating the map is non-empty.
Sourcepub fn into_inner(self) -> BTreeMap<K, V>
pub fn into_inner(self) -> BTreeMap<K, V>
Unwrap into the inner BTreeMap.
Trait Implementations§
Source§impl<K: Clone, V: Clone> Clone for BTreeMapNonEmpty<K, V>
impl<K: Clone, V: Clone> Clone for BTreeMapNonEmpty<K, V>
Source§fn clone(&self) -> BTreeMapNonEmpty<K, V>
fn clone(&self) -> BTreeMapNonEmpty<K, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ElicitSpec for BTreeMapNonEmpty<String, i32>
impl ElicitSpec for BTreeMapNonEmpty<String, i32>
Source§impl<K, V> Elicitation for BTreeMapNonEmpty<K, V>
impl<K, V> Elicitation for BTreeMapNonEmpty<K, V>
Source§async fn elicit<Comm: ElicitCommunicator>(
communicator: &Comm,
) -> ElicitResult<Self>
async fn elicit<Comm: ElicitCommunicator>( communicator: &Comm, ) -> ElicitResult<Self>
Elicit a value of this type from the user via style-aware client. Read more
Source§fn kani_proof() -> TokenStream
fn kani_proof() -> TokenStream
Generate a Kani symbolic execution proof harness for this type. Read more
Source§fn verus_proof() -> TokenStream
fn verus_proof() -> TokenStream
Generate a Verus specification proof for this type. Read more
Source§fn creusot_proof() -> TokenStream
fn creusot_proof() -> TokenStream
Generate a Creusot contract proof for this type. Read more
Source§fn elicit_checked(
peer: Peer<RoleServer>,
) -> impl Future<Output = ElicitResult<Self>> + Send
fn elicit_checked( peer: Peer<RoleServer>, ) -> impl Future<Output = ElicitResult<Self>> + Send
Server-side elicitation via MCP peer. Read more
Source§fn with_style(style: Self::Style) -> ElicitBuilder<Self>
fn with_style(style: Self::Style) -> ElicitBuilder<Self>
Create a builder for one-off style override. Read more
Source§fn elicit_proven<C: ElicitCommunicator>(
communicator: &C,
) -> impl Future<Output = ElicitResult<(Self, Established<Is<Self>>)>> + Send
fn elicit_proven<C: ElicitCommunicator>( communicator: &C, ) -> impl Future<Output = ElicitResult<(Self, Established<Is<Self>>)>> + Send
Elicit a value with proof it inhabits type Self. Read more
Source§fn prusti_proof() -> TokenStream
fn prusti_proof() -> TokenStream
Generate a Prusti separation logic proof for this type. Read more
Source§impl<K, V> Prompt for BTreeMapNonEmpty<K, V>
impl<K, V> Prompt for BTreeMapNonEmpty<K, V>
impl<K: Eq, V: Eq> Eq for BTreeMapNonEmpty<K, V>
impl<K, V> StructuralPartialEq for BTreeMapNonEmpty<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for BTreeMapNonEmpty<K, V>
impl<K, V> RefUnwindSafe for BTreeMapNonEmpty<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for BTreeMapNonEmpty<K, V>
impl<K, V> Sync for BTreeMapNonEmpty<K, V>
impl<K, V> Unpin for BTreeMapNonEmpty<K, V>
impl<K, V> UnsafeUnpin for BTreeMapNonEmpty<K, V>
impl<K, V> UnwindSafe for BTreeMapNonEmpty<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> WithContract for T
impl<T> WithContract for T
Source§fn with_contract<C>(contract: C) -> ContractedElicitation<Self, C>
fn with_contract<C>(contract: C) -> ContractedElicitation<Self, C>
Attach a contract to this type’s elicitation. Read more