Enum tantivy::schema::document::OwnedValue
source · pub enum OwnedValue {
}
Expand description
This is a owned variant of Value
, that can be passed around without lifetimes.
Represents the value of a any field.
It is an enum over all over all of the possible field type.
Variants§
Null
A null value.
Str(String)
The str type is used for any text information.
PreTokStr(PreTokenizedString)
Pre-tokenized str type,
U64(u64)
Unsigned 64-bits Integer u64
I64(i64)
Signed 64-bits Integer i64
F64(f64)
64-bits Float f64
Bool(bool)
Bool value
Date(DateTime)
Date/time with nanoseconds precision
Facet(Facet)
Facet
Bytes(Vec<u8>)
Arbitrarily sized byte array
Array(Vec<Self>)
A set of values.
Object(BTreeMap<String, Self>)
Dynamic object value.
IpAddr(Ipv6Addr)
IpV6 Address. Internally there is no IpV4, it needs to be converted to Ipv6Addr
.
Trait Implementations§
source§impl AsRef<OwnedValue> for OwnedValue
impl AsRef<OwnedValue> for OwnedValue
source§fn as_ref(&self) -> &OwnedValue
fn as_ref(&self) -> &OwnedValue
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for OwnedValue
impl Clone for OwnedValue
source§fn clone(&self) -> OwnedValue
fn clone(&self) -> OwnedValue
Returns a copy 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 moresource§impl Debug for OwnedValue
impl Debug for OwnedValue
source§impl<'de> Deserialize<'de> for OwnedValue
impl<'de> Deserialize<'de> for OwnedValue
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a [u8]> for OwnedValue
impl<'a> From<&'a [u8]> for OwnedValue
source§fn from(bytes: &'a [u8]) -> OwnedValue
fn from(bytes: &'a [u8]) -> OwnedValue
Converts to this type from the input type.
source§impl<'a> From<&'a str> for OwnedValue
impl<'a> From<&'a str> for OwnedValue
source§fn from(s: &'a str) -> OwnedValue
fn from(s: &'a str) -> OwnedValue
Converts to this type from the input type.
source§impl From<BTreeMap<String, OwnedValue>> for OwnedValue
impl From<BTreeMap<String, OwnedValue>> for OwnedValue
source§fn from(object: BTreeMap<String, OwnedValue>) -> OwnedValue
fn from(object: BTreeMap<String, OwnedValue>) -> OwnedValue
Converts to this type from the input type.
source§impl From<DateTime> for OwnedValue
impl From<DateTime> for OwnedValue
source§fn from(dt: DateTime) -> OwnedValue
fn from(dt: DateTime) -> OwnedValue
Converts to this type from the input type.
source§impl From<Facet> for OwnedValue
impl From<Facet> for OwnedValue
source§fn from(facet: Facet) -> OwnedValue
fn from(facet: Facet) -> OwnedValue
Converts to this type from the input type.
source§impl From<FastFieldValue> for OwnedValue
impl From<FastFieldValue> for OwnedValue
source§fn from(value: FastFieldValue) -> Self
fn from(value: FastFieldValue) -> Self
Converts to this type from the input type.
source§impl From<FieldValue> for OwnedValue
impl From<FieldValue> for OwnedValue
source§fn from(field_value: FieldValue) -> Self
fn from(field_value: FieldValue) -> Self
Converts to this type from the input type.
source§impl From<Ipv6Addr> for OwnedValue
impl From<Ipv6Addr> for OwnedValue
source§fn from(v: Ipv6Addr) -> OwnedValue
fn from(v: Ipv6Addr) -> OwnedValue
Converts to this type from the input type.
source§impl From<PreTokenizedString> for OwnedValue
impl From<PreTokenizedString> for OwnedValue
source§fn from(pretokenized_string: PreTokenizedString) -> OwnedValue
fn from(pretokenized_string: PreTokenizedString) -> OwnedValue
Converts to this type from the input type.
source§impl<'a, V: Value<'a>> From<ReferenceValue<'a, V>> for OwnedValue
impl<'a, V: Value<'a>> From<ReferenceValue<'a, V>> for OwnedValue
source§fn from(val: ReferenceValue<'a, V>) -> OwnedValue
fn from(val: ReferenceValue<'a, V>) -> OwnedValue
Converts to this type from the input type.
source§impl From<String> for OwnedValue
impl From<String> for OwnedValue
source§fn from(s: String) -> OwnedValue
fn from(s: String) -> OwnedValue
Converts to this type from the input type.
source§impl From<Value> for OwnedValue
impl From<Value> for OwnedValue
source§impl From<bool> for OwnedValue
impl From<bool> for OwnedValue
source§impl From<f64> for OwnedValue
impl From<f64> for OwnedValue
source§fn from(v: f64) -> OwnedValue
fn from(v: f64) -> OwnedValue
Converts to this type from the input type.
source§impl From<i64> for OwnedValue
impl From<i64> for OwnedValue
source§fn from(v: i64) -> OwnedValue
fn from(v: i64) -> OwnedValue
Converts to this type from the input type.
source§impl From<u64> for OwnedValue
impl From<u64> for OwnedValue
source§fn from(v: u64) -> OwnedValue
fn from(v: u64) -> OwnedValue
Converts to this type from the input type.
source§impl PartialEq for OwnedValue
impl PartialEq for OwnedValue
source§fn eq(&self, other: &OwnedValue) -> bool
fn eq(&self, other: &OwnedValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OwnedValue
impl Serialize for OwnedValue
source§impl<'a> Value<'a> for &'a OwnedValue
impl<'a> Value<'a> for &'a OwnedValue
§type ArrayIter = Iter<'a, OwnedValue>
type ArrayIter = Iter<'a, OwnedValue>
The child value type returned by this doc value.
The iterator for walking through the elements within the array.
§type ObjectIter = ObjectMapIter<'a>
type ObjectIter = ObjectMapIter<'a>
The visitor walking through the key-value pairs within
the object.
source§fn as_value(&self) -> ReferenceValue<'a, Self>
fn as_value(&self) -> ReferenceValue<'a, Self>
Returns the field value represented by an enum which borrows it’s data.
source§fn as_leaf(&self) -> Option<ReferenceValueLeaf<'a>>
fn as_leaf(&self) -> Option<ReferenceValueLeaf<'a>>
If the Value is a String, returns the associated str. Returns None otherwise.
source§fn as_str(&self) -> Option<&'a str>
fn as_str(&self) -> Option<&'a str>
If the Value is a String, returns the associated str. Returns None otherwise.
source§fn as_u64(&self) -> Option<u64>
fn as_u64(&self) -> Option<u64>
If the Value is a u64, returns the associated u64. Returns None otherwise.
source§fn as_i64(&self) -> Option<i64>
fn as_i64(&self) -> Option<i64>
If the Value is a i64, returns the associated i64. Returns None otherwise.
source§fn as_f64(&self) -> Option<f64>
fn as_f64(&self) -> Option<f64>
If the Value is a f64, returns the associated f64. Returns None otherwise.
source§fn as_datetime(&self) -> Option<DateTime>
fn as_datetime(&self) -> Option<DateTime>
If the Value is a datetime, returns the associated datetime. Returns None otherwise.
source§fn as_ip_addr(&self) -> Option<Ipv6Addr>
fn as_ip_addr(&self) -> Option<Ipv6Addr>
If the Value is a IP address, returns the associated IP. Returns None otherwise.
source§fn as_bool(&self) -> Option<bool>
fn as_bool(&self) -> Option<bool>
If the Value is a bool, returns the associated bool. Returns None otherwise.
source§fn as_pre_tokenized_text(&self) -> Option<&'a PreTokenizedString>
fn as_pre_tokenized_text(&self) -> Option<&'a PreTokenizedString>
If the Value is a pre-tokenized string, returns the associated string. Returns None
otherwise.
source§fn as_bytes(&self) -> Option<&'a [u8]>
fn as_bytes(&self) -> Option<&'a [u8]>
If the Value is a bytes value, returns the associated set of bytes. Returns None otherwise.
source§fn as_facet(&self) -> Option<&'a Facet>
fn as_facet(&self) -> Option<&'a Facet>
If the Value is a facet, returns the associated facet. Returns None otherwise.
source§fn as_array(&self) -> Option<Self::ArrayIter>
fn as_array(&self) -> Option<Self::ArrayIter>
Returns the iterator over the array if the Value is an array.
source§fn as_object(&self) -> Option<Self::ObjectIter>
fn as_object(&self) -> Option<Self::ObjectIter>
Returns the iterator over the object if the Value is an object.
source§impl ValueDeserialize for OwnedValue
impl ValueDeserialize for OwnedValue
source§fn deserialize<'de, D>(deserializer: D) -> Result<Self, DeserializeError>where
D: ValueDeserializer<'de>,
fn deserialize<'de, D>(deserializer: D) -> Result<Self, DeserializeError>where
D: ValueDeserializer<'de>,
Attempts to deserialize Self from a given value deserializer.
impl Eq for OwnedValue
impl StructuralPartialEq for OwnedValue
Auto Trait Implementations§
impl Freeze for OwnedValue
impl RefUnwindSafe for OwnedValue
impl Send for OwnedValue
impl Sync for OwnedValue
impl Unpin for OwnedValue
impl UnwindSafe for OwnedValue
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.