/// Retrieves the primitive value as a single string.
///
/// If the value contains multiple strings, they are concatenated
/// (separated by `'\\'`) into an owned string.
Retrieves the primitive value as a single string.
If the value contains multiple strings, they are concatenated
(separated by `'\\'`) into an owned string.
Retrieves the primitive value as a single string . If the value contains multiple strings they are concatenated ( separated by ` ' \\ ' ` ) into an owned string .
pub fn to_str(&self) -> Result<Cow<str>, CastValueError> {
        match self {
            Value::Primitive(PrimitiveValue::Str(v)) => Ok(Cow::from(v.as_str())),
            Value::Primitive(PrimitiveValue::Strs(v)) => Ok(Cow::from(v.into_iter().join("\\"))),
            _ => Err(CastValueError {
                requested: "string",
                got: self.value_type(),
            }),
        }
    }
pub fn to_str ( & self ) -> Result < Cow < str > , CastValueError > { match self { Value :: Primitive ( PrimitiveValue :: Str ( v ) ) => Ok ( Cow :: from ( v . as_str ( ) ) ) , Value :: Primitive ( PrimitiveValue :: Strs ( v ) ) => Ok ( Cow :: from ( v . into_iter ( ) . join ( " \\ " ) ) ) , _ => Err ( CastValueError { requested : " " , got : self . value_type ( ) , } ) , } }
Retrieves the primitive value as a single string.
Retrieves the primitive value as a single string .
&self