Skip to main content

Term

Struct Term 

Source
pub struct Term(/* private fields */);
Expand description

A full ciphertext, serialised: left and right halves, with the wire header. What a scheme stores. Compared with the scheme’s compare_raw_slices, or against a Query with compare_left_to_full; never byte by byte, since a full ciphertext carries a random nonce and one value has many. So no PartialEq: == on two terms of one value would be false.

Implementations§

Source§

impl Term

Source

pub fn as_bytes(&self) -> &[u8] ⓘ

The serialised bytes.

Source

pub fn into_bytes(self) -> Vec<u8> ⓘ

The serialised bytes, owned.

Source

pub fn from_bytes(bytes: Vec<u8>) -> Self

Bytes read back from storage, as this type. Nothing is checked here: the comparators parse the bytes and return None for ones that are not a ciphertext of their scheme.

Trait Implementations§

Source§

impl AsRef<[u8]> for Term

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Term

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Term

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Term> for Vec<u8>

Source§

fn from(value: Term) -> Vec<u8> ⓘ

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Forget for Term

§

impl Freeze for Term

§

impl Move for Term

§

impl RefUnwindSafe for Term

§

impl Send for Term

§

impl Sync for Term

§

impl Unpin for Term

§

impl UnsafeUnpin for Term

§

impl UnwindSafe for Term

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S, T, P> Supports<Nulls<T, P>> for S
where S: Supports<T> + ?Sized, T: FixedWidth, P: NullPolicy,

Source§

fn supports(target: Nulls<T, P>) -> bool

Whether the scheme takes terms of target. For a marker, true (the impl exists); for an OrderTarget, the scheme’s list.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.