Enum txtai::api::Text[][src]

pub enum Text {
    String(String),
    List(Vec<String>),
}

Variants

String(String)
List(Vec<String>)

Implementations

impl Text[src]

pub fn as_string_mut(&mut self) -> Option<&mut String>[src]

Optionally returns mutable references to the inner fields if this is a Text::String, otherwise None

pub fn as_string(&self) -> Option<&String>[src]

Optionally returns references to the inner fields if this is a Text::String, otherwise None

pub fn into_string(self) -> Result<String, Self>[src]

Returns the inner fields if this is a Text::String, otherwise returns back the enum in the Err case of the result

pub fn as_list_mut(&mut self) -> Option<&mut Vec<String>>[src]

Optionally returns mutable references to the inner fields if this is a Text::List, otherwise None

pub fn as_list(&self) -> Option<&Vec<String>>[src]

Optionally returns references to the inner fields if this is a Text::List, otherwise None

pub fn into_list(self) -> Result<Vec<String>, Self>[src]

Returns the inner fields if this is a Text::List, otherwise returns back the enum in the Err case of the result

Trait Implementations

impl Debug for Text[src]

impl<'de> Deserialize<'de> for Text[src]

Auto Trait Implementations

impl RefUnwindSafe for Text

impl Send for Text

impl Sync for Text

impl Unpin for Text

impl UnwindSafe for Text

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.