Struct TokenizedSelector
pub struct TokenizedSelector<const N: usize>(/* private fields */);Expand description
Represents a tokenized selector for a value in a JSON object.
Implementations§
§impl<const N: usize> TokenizedSelector<N>
impl<const N: usize> TokenizedSelector<N>
pub fn as_bytes(&self) -> [u8; N]
pub fn aead_nonce(&self) -> [u8; 12]
pub fn aead_nonce(&self) -> [u8; 12]
The AEAD nonce for this selector’s entry under the SteVec envelope wire format: the first 12 bytes of the tokenized selector.
Every entry of a document encrypts under the document’s single data
key, so nonce distinctness is what prevents equal plaintexts at
different (path, value) positions from producing equal ciphertexts —
and because the nonce is re-derivable from the entry’s stored s,
nothing extra is stored. Ciphertext equality can then only occur where
selector equality already reveals the same fact, which is public by
design (containment matches on selector presence).
A 12-byte nonce needs at least 12 selector bytes; N < 12 is rejected
at compile time rather than panicking at runtime. Production selectors
are 16 bytes.
Trait Implementations§
§impl<const N: usize> Clone for TokenizedSelector<N>
impl<const N: usize> Clone for TokenizedSelector<N>
§fn clone(&self) -> TokenizedSelector<N>
fn clone(&self) -> TokenizedSelector<N>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<const N: usize> Copy for TokenizedSelector<N>
§impl<const N: usize> Debug for TokenizedSelector<N>
impl<const N: usize> Debug for TokenizedSelector<N>
§impl<'de, const N: usize> Deserialize<'de> for TokenizedSelector<N>
impl<'de, const N: usize> Deserialize<'de> for TokenizedSelector<N>
§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>,
impl<const N: usize> Eq for TokenizedSelector<N>
§impl<const N: usize> PartialEq for TokenizedSelector<N>
impl<const N: usize> PartialEq for TokenizedSelector<N>
§impl<const N: usize> Serialize for TokenizedSelector<N>
impl<const N: usize> Serialize for TokenizedSelector<N>
impl<const N: usize> StructuralPartialEq for TokenizedSelector<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for TokenizedSelector<N>
impl<const N: usize> RefUnwindSafe for TokenizedSelector<N>
impl<const N: usize> Send for TokenizedSelector<N>
impl<const N: usize> Sync for TokenizedSelector<N>
impl<const N: usize> Unpin for TokenizedSelector<N>
impl<const N: usize> UnsafeUnpin for TokenizedSelector<N>
impl<const N: usize> UnwindSafe for TokenizedSelector<N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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