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