[][src]Enum tantivy::schema::Value

pub enum Value {
    Str(String),
    U64(u64),
    I64(i64),
    F64(f64),
    Date(DateTime),
    Facet(Facet),
    Bytes(Vec<u8>),
}

Value represents the value of a any field. It is an enum over all over all of the possible field type.

Variants

Str(String)

The str type is used for any text information.

U64(u64)

Unsigned 64-bits Integer u64

I64(i64)

Signed 64-bits Integer i64

F64(f64)

64-bits Float f64

Date(DateTime)

Signed 64-bits Date time stamp date

Facet(Facet)

Hierarchical Facet

Bytes(Vec<u8>)

Arbitrarily sized byte array

Methods

impl Value[src]

pub fn text(&self) -> Option<&str>[src]

Returns the text value, provided the value is of the Str type. (Returns None if the value is not of the Str type).

pub fn u64_value(&self) -> u64[src]

Returns the u64-value, provided the value is of the U64 type.

Panics

If the value is not of type U64

pub fn i64_value(&self) -> i64[src]

Returns the i64-value, provided the value is of the I64 type.

Panics

If the value is not of type I64

pub fn f64_value(&self) -> f64[src]

Returns the f64-value, provided the value is of the F64 type.

Panics

If the value is not of type F64

pub fn date_value(&self) -> &DateTime[src]

Returns the Date-value, provided the value is of the Date type.

Panics

If the value is not of type Date

Trait Implementations

impl Eq for Value[src]

impl Clone for Value[src]

impl PartialOrd<Value> for Value[src]

impl PartialEq<Value> for Value[src]

impl Ord for Value[src]

impl From<String> for Value[src]

impl From<u64> for Value[src]

impl From<i64> for Value[src]

impl From<f64> for Value[src]

impl From<DateTime<Utc>> for Value[src]

impl<'a> From<&'a str> for Value[src]

impl<'a> From<Facet> for Value[src]

impl From<Vec<u8>> for Value[src]

impl Debug for Value[src]

impl Serialize for Value[src]

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

Auto Trait Implementations

impl Sync for Value

impl Send for Value

impl Unpin for Value

impl UnwindSafe for Value

impl RefUnwindSafe for Value

Blanket Implementations

impl<T> Fruit for T where
    T: Send + Downcast
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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.

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

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

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

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

impl<T> Erased for T[src]

impl<T> Downcast for T where
    T: Any
[src]