pub struct PromptText { /* private fields */ }Expand description
Owned prompt text.
Implementations§
Source§impl PromptText
impl PromptText
Sourcepub fn new(text: impl Into<String>) -> Result<PromptText, PromptTextError>
pub fn new(text: impl Into<String>) -> Result<PromptText, PromptTextError>
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the owned prompt text.
Trait Implementations§
Source§impl AsRef<str> for PromptText
impl AsRef<str> for PromptText
Source§impl Clone for PromptText
impl Clone for PromptText
Source§fn clone(&self) -> PromptText
fn clone(&self) -> PromptText
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptText
impl Debug for PromptText
Source§impl Display for PromptText
impl Display for PromptText
Source§impl Hash for PromptText
impl Hash for PromptText
Source§impl PartialEq for PromptText
impl PartialEq for PromptText
Source§fn eq(&self, other: &PromptText) -> bool
fn eq(&self, other: &PromptText) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PromptText
impl StructuralPartialEq for PromptText
Auto Trait Implementations§
impl Freeze for PromptText
impl RefUnwindSafe for PromptText
impl Send for PromptText
impl Sync for PromptText
impl Unpin for PromptText
impl UnsafeUnpin for PromptText
impl UnwindSafe for PromptText
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