pub struct LinkedListNonEmpty<T>(/* private fields */);Expand description
A LinkedList that is guaranteed to be non-empty.
Implementations§
Source§impl<T> LinkedListNonEmpty<T>
impl<T> LinkedListNonEmpty<T>
Sourcepub fn new(list: LinkedList<T>) -> Result<Self, ValidationError>
pub fn new(list: LinkedList<T>) -> Result<Self, ValidationError>
Create a new LinkedListNonEmpty, validating the list is non-empty.
Sourcepub fn get(&self) -> &LinkedList<T>
pub fn get(&self) -> &LinkedList<T>
Get the inner LinkedList.
Sourcepub fn into_inner(self) -> LinkedList<T>
pub fn into_inner(self) -> LinkedList<T>
Unwrap into the inner LinkedList.
Trait Implementations§
Source§impl<T: Clone> Clone for LinkedListNonEmpty<T>
impl<T: Clone> Clone for LinkedListNonEmpty<T>
Source§fn clone(&self) -> LinkedListNonEmpty<T>
fn clone(&self) -> LinkedListNonEmpty<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 LinkedListNonEmpty<T>
impl<T: Debug> Debug for LinkedListNonEmpty<T>
Source§impl<T> Elicitation for LinkedListNonEmpty<T>where
T: Elicitation + Send,
impl<T> Elicitation for LinkedListNonEmpty<T>where
T: Elicitation + Send,
Source§type Style = <LinkedList<T> as Elicitation>::Style
type Style = <LinkedList<T> as Elicitation>::Style
The style enum for this type. Read more
Source§async fn elicit(client: &ElicitClient<'_>) -> ElicitResult<Self>
async fn elicit(client: &ElicitClient<'_>) -> ElicitResult<Self>
Elicit a value of this type from the user via style-aware client. 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§impl<T: PartialEq> PartialEq for LinkedListNonEmpty<T>
impl<T: PartialEq> PartialEq for LinkedListNonEmpty<T>
Source§impl<T> Prompt for LinkedListNonEmpty<T>where
T: Elicitation + Send,
impl<T> Prompt for LinkedListNonEmpty<T>where
T: Elicitation + Send,
impl<T: Eq> Eq for LinkedListNonEmpty<T>
impl<T> StructuralPartialEq for LinkedListNonEmpty<T>
Auto Trait Implementations§
impl<T> Freeze for LinkedListNonEmpty<T>
impl<T> RefUnwindSafe for LinkedListNonEmpty<T>where
T: RefUnwindSafe,
impl<T> Send for LinkedListNonEmpty<T>where
T: Send,
impl<T> Sync for LinkedListNonEmpty<T>where
T: Sync,
impl<T> Unpin for LinkedListNonEmpty<T>
impl<T> UnwindSafe for LinkedListNonEmpty<T>where
T: RefUnwindSafe + UnwindSafe,
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<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> 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