Struct PromptText
pub struct PromptText(/* private fields */);Implementations§
§impl PromptText
impl PromptText
pub fn new(value: impl AsRef<str>) -> Result<PromptText, AiPromptError>
pub fn as_str(&self) -> &str
pub fn value(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
§impl AsRef<str> for PromptText
impl AsRef<str> for PromptText
§impl Clone for PromptText
impl Clone for PromptText
§fn clone(&self) -> PromptText
fn clone(&self) -> PromptText
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 more§impl Debug for PromptText
impl Debug for PromptText
§impl Display for PromptText
impl Display for PromptText
§impl FromStr for PromptText
impl FromStr for PromptText
§type Err = AiPromptError
type Err = AiPromptError
The associated error which can be returned from parsing.
§fn from_str(value: &str) -> Result<PromptText, <PromptText as FromStr>::Err>
fn from_str(value: &str) -> Result<PromptText, <PromptText as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for PromptText
impl Hash for PromptText
§impl Ord for PromptText
impl Ord for PromptText
§impl PartialEq for PromptText
impl PartialEq for PromptText
§impl PartialOrd for PromptText
impl PartialOrd for PromptText
§impl TryFrom<&str> for PromptText
impl TryFrom<&str> for PromptText
§type Error = AiPromptError
type Error = AiPromptError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<PromptText, <PromptText as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<PromptText, <PromptText as TryFrom<&str>>::Error>
Performs the conversion.
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