Skip to main content

RepeatPrompt

Struct RepeatPrompt 

Source
pub struct RepeatPrompt<R> { /* private fields */ }
Expand description

The format rule to whether repeat the message along with its prefix and input prefix.

This is returned by FmtRule::repeat_prompt.

Trait Implementations§

Source§

impl<R: Clone> Clone for RepeatPrompt<R>

Source§

fn clone(&self) -> RepeatPrompt<R>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: Copy> Copy for RepeatPrompt<R>

Source§

impl<R: FmtRule> FmtRule for RepeatPrompt<R>

Source§

fn msg_prefix(self, prefix: &str) -> MsgPrefix<'_, Self>

The message prefix, usually put right before the message.
Source§

fn input_prefix(self, prefix: &str) -> InputPrefix<'_, Self>

The input prefix, usually put right before the user input.
Source§

fn list_surrounds<'a>( self, open: &'a str, close: &'a str, ) -> ListSurrounds<'a, Self>

Represents the surrounds of the index of each list item for selectable prompts.
Source§

fn list_msg_pos(self, pos: Position) -> ListMsgPos<Self>

The position of the message for selectable prompts (either below or above the list).
Source§

fn break_line(self, value: bool) -> BreakLine<Self>

Whether to break a line right after the message or not.
Source§

fn repeat_prompt(self, value: bool) -> RepeatPrompt<Self>

Whether to repeat the message along with its prefix and the input prefix, when the previous input is invalid, or not. Read more
Source§

impl<R> From<RepeatPrompt<R>> for SelectedFmtRules<'_>
where Self: From<R>,

Source§

fn from(value: RepeatPrompt<R>) -> Self

Converts to this type from the input type.
Source§

impl<R> From<RepeatPrompt<R>> for WrittenFmtRules<'_>
where Self: From<R>,

Source§

fn from(value: RepeatPrompt<R>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<R> Freeze for RepeatPrompt<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for RepeatPrompt<R>
where R: RefUnwindSafe,

§

impl<R> Send for RepeatPrompt<R>
where R: Send,

§

impl<R> Sync for RepeatPrompt<R>
where R: Sync,

§

impl<R> Unpin for RepeatPrompt<R>
where R: Unpin,

§

impl<R> UnsafeUnpin for RepeatPrompt<R>
where R: UnsafeUnpin,

§

impl<R> UnwindSafe for RepeatPrompt<R>
where R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromOutput<T> for T

Source§

fn from_output(output: T) -> T

Converts the raw output into this type.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.