Skip to main content

QueryFormat

Enum QueryFormat 

Source
#[non_exhaustive]
#[repr(u16)]
pub enum QueryFormat { RawBinary = 0, JsonPointer = 1, }
Expand description

Reserved Query formats (0..=4095 reserved for REPE)

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

RawBinary = 0

§

JsonPointer = 1

Trait Implementations§

Source§

impl Clone for QueryFormat

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 Copy for QueryFormat

Source§

impl Debug for QueryFormat

Source§

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

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

impl Eq for QueryFormat

Source§

impl From<QueryFormat> for u16

Source§

fn from(v: QueryFormat) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for QueryFormat

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'de> Read<'de> for QueryFormat

Source§

fn read<O: Options>(&mut self, p: &mut Parser<'de, O>) -> Result<(), ErrorCode>

Parse into self, from the cursor’s current position. Read more
Source§

impl<'de> Read<'de> for QueryFormat

Source§

fn read<O: Options>(&mut self, r: &mut Reader<'de, O>) -> Result<(), ErrorCode>

Read into self, from the reader’s current position. Read more
Source§

fn read_bulk<O>( _out: &mut Vec<Self>, _n: usize, _elem: u8, _r: &mut Reader<'de, O>, ) -> Result<bool, ErrorCode>
where O: Options,

Fill out from the payload of a typed array of n elements whose element header is elem, or return false to decline. Read more
Source§

impl<'de> ReadEnum<'de> for QueryFormat

Source§

fn read_name<O: Options>( &mut self, index: usize, p: &mut Parser<'de, O>, ) -> Result<bool, ErrorCode>

Take variant index written as a bare name, the cursor sitting on the first byte of it. Read more
Source§

fn read_payload<O: Options>( &mut self, index: usize, p: &mut Parser<'de, O>, ) -> Result<bool, ErrorCode>

Take variant index written as the single key of an object, the cursor sitting on the first byte of that key. Read more
Source§

impl<'de> ReadEnum<'de> for QueryFormat

Source§

fn read_name(&mut self, index: usize, name: &[u8]) -> Result<bool, ErrorCode>

Take variant index written as a bare name. Read more
Source§

fn read_payload<O: Options>( &mut self, index: usize, name: &[u8], r: &mut Reader<'de, O>, ) -> Result<bool, ErrorCode>

Take variant index written as the single member of an object, the reader positioned on that member’s value. Read more
Source§

impl StructuralPartialEq for QueryFormat

Source§

impl TryFrom<u16> for QueryFormat

Source§

type Error = u16

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

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Variants for QueryFormat

Source§

const VARIANTS: &'static [&'static str]

Variant names, in declaration order. Index i here is variant i in each format’s read_name and read_payload.
Source§

const MAP: &'static KeyMap

The perfect hash over Variants::VARIANTS, built during const evaluation. Read more
Source§

impl Write for QueryFormat

Source§

fn write<O: Options>(&self, w: &mut Writer<'_, O>)

Source§

fn is_null(&self) -> bool

Whether this value is absent, and so is left out of an object under Options::SKIP_NULL. Read more
Source§

impl Write for QueryFormat

Source§

const ARRAY: Option<&'static [u8]>

The header bytes a contiguous run of this type is stored under, or None if it has no array form of its own and belongs in a generic one. Read more
Source§

fn write<O: Options>(&self, w: &mut Writer<'_, O>)

Source§

fn write_payload<O: Options>(items: &[Self], w: &mut Writer<'_, O>)
where Self: Sized,

Append items as the payload of a typed array whose header and count the caller has already written. Read more
Source§

fn is_null(&self) -> bool

Whether this value is absent, and so is left out of an object under Options::SKIP_NULL. Read more

Auto Trait Implementations§

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> ReadWrite for T
where T: for<'de> Read<'de> + Write,

Source§

impl<T> ReadWrite for T
where T: for<'de> Read<'de> + Write,

Source§

impl<T> ReadWrite for T
where T: ReadWrite + ReadWrite,

Source§

impl<T> Servable for T
where T: for<'de> ServableRead<'de> + ServableWrite,

Source§

impl<'de, T> ServableRead<'de> for T
where T: Read<'de> + Read<'de>,

Source§

impl<T> ServableWrite for T
where T: Write + Write + ?Sized,

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.