pub struct BTreeSetNonEmpty<T>(/* private fields */);Expand description
A BTreeSet that is guaranteed to be non-empty.
Implementations§
Source§impl<T> BTreeSetNonEmpty<T>
impl<T> BTreeSetNonEmpty<T>
Sourcepub fn new(set: BTreeSet<T>) -> Result<Self, ValidationError>
pub fn new(set: BTreeSet<T>) -> Result<Self, ValidationError>
Create a new BTreeSetNonEmpty, validating the set is non-empty.
Sourcepub fn into_inner(self) -> BTreeSet<T>
pub fn into_inner(self) -> BTreeSet<T>
Unwrap into the inner BTreeSet.
Trait Implementations§
Source§impl<T: Clone> Clone for BTreeSetNonEmpty<T>
impl<T: Clone> Clone for BTreeSetNonEmpty<T>
Source§fn clone(&self) -> BTreeSetNonEmpty<T>
fn clone(&self) -> BTreeSetNonEmpty<T>
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<T: Debug> Debug for BTreeSetNonEmpty<T>
impl<T: Debug> Debug for BTreeSetNonEmpty<T>
Source§impl<T: ElicitPromptTree> ElicitPromptTree for BTreeSetNonEmpty<T>
impl<T: ElicitPromptTree> ElicitPromptTree for BTreeSetNonEmpty<T>
Source§fn prompt_tree() -> PromptTree
fn prompt_tree() -> PromptTree
Return the static prompt tree for this type. Read more
Source§fn assembled_prompts() -> Vec<AssembledPrompt>
fn assembled_prompts() -> Vec<AssembledPrompt>
Return the complete assembled prompts in elicitation order. Read more
Source§impl ElicitSpec for BTreeSetNonEmpty<i32>
impl ElicitSpec for BTreeSetNonEmpty<i32>
Source§impl<T> Elicitation for BTreeSetNonEmpty<T>
impl<T> Elicitation for BTreeSetNonEmpty<T>
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
Returns a
proc_macro2::TokenStream containing a Verus-verified function
with requires/ensures specifications for this type’s invariants. Read moreSource§fn creusot_proof() -> TokenStream
fn creusot_proof() -> TokenStream
Returns a
proc_macro2::TokenStream containing Creusot contract functions
with #[requires]/#[ensures]/#[trusted] attributes for this type’s invariants. Read moreSource§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
Returns a
proc_macro2::TokenStream containing Prusti contract functions
with #[requires]/#[ensures] attributes for this type’s invariants. Read moreSource§impl<T: PartialEq> PartialEq for BTreeSetNonEmpty<T>
impl<T: PartialEq> PartialEq for BTreeSetNonEmpty<T>
Source§impl<T> Prompt for BTreeSetNonEmpty<T>where
T: Elicitation + Send,
impl<T> Prompt for BTreeSetNonEmpty<T>where
T: Elicitation + Send,
impl<T: Eq> Eq for BTreeSetNonEmpty<T>
impl<T> StructuralPartialEq for BTreeSetNonEmpty<T>
Auto Trait Implementations§
impl<T> Freeze for BTreeSetNonEmpty<T>
impl<T> RefUnwindSafe for BTreeSetNonEmpty<T>where
T: RefUnwindSafe,
impl<T> Send for BTreeSetNonEmpty<T>where
T: Send,
impl<T> Sync for BTreeSetNonEmpty<T>where
T: Sync,
impl<T> Unpin for BTreeSetNonEmpty<T>
impl<T> UnsafeUnpin for BTreeSetNonEmpty<T>
impl<T> UnwindSafe for BTreeSetNonEmpty<T>where
T: 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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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