[−][src]Enum rucline::prompt::Outcome
The outcome of read_line
, being either accepted or canceled by the user.
Variants
Accepted(String)
If the user accepts the prompt input, i.e. an Accept
event was emitted. this variant will
contain the accepted text.
Canceled(Buffer)
If the user cancels the prompt input, i.e. a Cancel
event was emitted. this variant will
contain the rejected buffer, with text and cursor position intact from the moment of
rejection.
Implementations
impl Outcome
[src]
#[must_use]pub fn was_acceoted(&self) -> bool
[src]
Returns true if the outcome was accepted.
#[must_use]pub fn unwrap(self) -> String
[src]
#[must_use]pub fn some(self) -> Option<String>
[src]
pub fn ok(self) -> Result<String, Buffer>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnwindSafe for Outcome
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,