Struct cipherstash_client::indexer::Indexer
source · pub struct Indexer {
pub indexes: HashMap<String, MappingIndexer>,
pub decoder: RecordDecoder,
}Expand description
An indexer that can index an entire record based on a CollectionSchema
Fields§
§indexes: HashMap<String, MappingIndexer>§decoder: RecordDecoderImplementations§
source§impl Indexer
impl Indexer
pub fn new(
indexes: HashMap<String, MappingIndexer>,
schema: RecordSchema
) -> Self
sourcepub fn decode_from_cbor(bytes: &[u8]) -> Result<Self, LoadIndexerError>
pub fn decode_from_cbor(bytes: &[u8]) -> Result<Self, LoadIndexerError>
Decode a record indexer from a CBOR byte array
The CBOR byte array is a serialized CollectionSchema struct.
sourcepub fn encrypt(
&mut self,
record: &Record
) -> Result<Vec<TermVector>, RecordIndexingError>
pub fn encrypt(
&mut self,
record: &Record
) -> Result<Vec<TermVector>, RecordIndexingError>
Encrypt a record and return an array of TermVector used for indexing
sourcepub fn encrypt_query(
&mut self,
query: Query
) -> Result<Vec<Constraint>, QueryIndexingError>
pub fn encrypt_query(
&mut self,
query: Query
) -> Result<Vec<Constraint>, QueryIndexingError>
Encrypt a query and return an array of Constraint used for querying
sourcepub fn encrypt_cbor(
&mut self,
record_bytes: &[u8]
) -> Result<Vec<u8>, RecordIndexingError>
pub fn encrypt_cbor(
&mut self,
record_bytes: &[u8]
) -> Result<Vec<u8>, RecordIndexingError>
Decode a record from CBOR, encrypt it using ORE and return the result as a CBOR byte buffer.
The CBOR byte array is a serialized array of TermVectors.
pub fn get_index_id(&self, index_name: &str) -> Option<Uuid>
Trait Implementations§
source§impl TryFrom<CollectionSchema> for Indexer
impl TryFrom<CollectionSchema> for Indexer
§type Error = LoadIndexerError
type Error = LoadIndexerError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl !RefUnwindSafe for Indexer
impl Send for Indexer
impl !Sync for Indexer
impl Unpin for Indexer
impl UnwindSafe for Indexer
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
source§fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
source§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
Convert the subject to a given type.
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request