Enum IndexedValue
pub enum IndexedValue<T> {
Null(TokenizedSelector, T, IndexedNull),
Bool(TokenizedSelector, T, IndexedBool),
Number(TokenizedSelector, T, IndexedNumber),
String(TokenizedSelector, T, IndexedString),
Array(TokenizedSelector, T, IndexedArray<T>),
Object(TokenizedSelector, T, IndexedObject<T>),
}Expand description
An IndexedValue structurally mirrors a serde_json::Value and enhances it with cryptographic search terms.
Variants§
Null(TokenizedSelector, T, IndexedNull)
Bool(TokenizedSelector, T, IndexedBool)
Number(TokenizedSelector, T, IndexedNumber)
String(TokenizedSelector, T, IndexedString)
Array(TokenizedSelector, T, IndexedArray<T>)
Object(TokenizedSelector, T, IndexedObject<T>)
Implementations§
§impl<T> IndexedValue<T>
impl<T> IndexedValue<T>
pub fn tokenized_selector(&self) -> &TokenizedSelector
pub fn tokenized_selector(&self) -> &TokenizedSelector
Gets the [TokenizedSelector] associated with self.
pub fn payload(&self) -> &T
pub fn into_payload(self) -> T
pub fn map<U, F, E>(self, mapper: F) -> Result<IndexedValue<U>, E>
Trait Implementations§
§impl<T: Debug> Debug for IndexedValue<T>
impl<T: Debug> Debug for IndexedValue<T>
§impl<T> JsonbContains<IndexedValue<()>> for IndexedValue<T>
impl<T> JsonbContains<IndexedValue<()>> for IndexedValue<T>
fn jsonb_contains(&self, other: &IndexedValue<()>) -> bool
§impl<T> JsonbContains<IndexedValue<()>> for IndexedArray<T>
impl<T> JsonbContains<IndexedValue<()>> for IndexedArray<T>
fn jsonb_contains(&self, other: &IndexedValue<()>) -> bool
§impl<T> JsonbContains<IndexedValue<()>> for IndexedObject<T>
impl<T> JsonbContains<IndexedValue<()>> for IndexedObject<T>
fn jsonb_contains(&self, other: &IndexedValue<()>) -> bool
§impl<T> PartialEq<IndexedValue<()>> for IndexedValue<T>
impl<T> PartialEq<IndexedValue<()>> for IndexedValue<T>
§fn eq(&self, other: &IndexedValue<()>) -> bool
fn eq(&self, other: &IndexedValue<()>) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
impl<T> Freeze for IndexedValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for IndexedValue<T>where
T: RefUnwindSafe,
impl<T> Send for IndexedValue<T>where
T: Send,
impl<T> Sync for IndexedValue<T>where
T: Sync,
impl<T> Unpin for IndexedValue<T>where
T: Unpin,
impl<T> UnsafeUnpin for IndexedValue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for IndexedValue<T>where
T: UnwindSafe,
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more