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