[][src]Enum no_proto::schema::NP_Parsed_Schema

pub enum NP_Parsed_Schema {
    None,
    Any {
        sortable: bool,
        i: NP_TypeKeys,
    },
    UTF8String {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<String>>,
        size: u16,
    },
    Bytes {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<Vec<u8>>>,
        size: u16,
    },
    Int8 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<i8>>,
    },
    Int16 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<i16>>,
    },
    Int32 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<i32>>,
    },
    Int64 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<i64>>,
    },
    Uint8 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<u8>>,
    },
    Uint16 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<u16>>,
    },
    Uint32 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<u32>>,
    },
    Uint64 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<u64>>,
    },
    Float {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<f32>>,
    },
    Double {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<f64>>,
    },
    Decimal {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<NP_Dec>>,
        exp: u8,
    },
    Boolean {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<bool>>,
    },
    Geo {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<NP_Geo>>,
        size: u8,
    },
    Date {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<NP_Date>>,
    },
    Enum {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Box<u8>>,
        choices: Vec<String>,
    },
    Uuid {
        sortable: bool,
        i: NP_TypeKeys,
    },
    Ulid {
        sortable: bool,
        i: NP_TypeKeys,
    },
    Table {
        sortable: bool,
        i: NP_TypeKeys,
        columns: Vec<(u8, String, Box<NP_Parsed_Schema>)>,
    },
    Map {
        sortable: bool,
        i: NP_TypeKeys,
        value: Box<NP_Parsed_Schema>,
    },
    List {
        sortable: bool,
        i: NP_TypeKeys,
        of: Box<NP_Parsed_Schema>,
    },
    Tuple {
        sortable: bool,
        i: NP_TypeKeys,
        values: Vec<Box<NP_Parsed_Schema>>,
    },
}

When a schema is parsed from JSON or Bytes, it is stored in this recursive type

Variants

None
Any

Fields of Any

sortable: booli: NP_TypeKeys
UTF8String

Fields of UTF8String

sortable: booli: NP_TypeKeysdefault: Option<Box<String>>size: u16
Bytes

Fields of Bytes

sortable: booli: NP_TypeKeysdefault: Option<Box<Vec<u8>>>size: u16
Int8

Fields of Int8

sortable: booli: NP_TypeKeysdefault: Option<Box<i8>>
Int16

Fields of Int16

sortable: booli: NP_TypeKeysdefault: Option<Box<i16>>
Int32

Fields of Int32

sortable: booli: NP_TypeKeysdefault: Option<Box<i32>>
Int64

Fields of Int64

sortable: booli: NP_TypeKeysdefault: Option<Box<i64>>
Uint8

Fields of Uint8

sortable: booli: NP_TypeKeysdefault: Option<Box<u8>>
Uint16

Fields of Uint16

sortable: booli: NP_TypeKeysdefault: Option<Box<u16>>
Uint32

Fields of Uint32

sortable: booli: NP_TypeKeysdefault: Option<Box<u32>>
Uint64

Fields of Uint64

sortable: booli: NP_TypeKeysdefault: Option<Box<u64>>
Float

Fields of Float

sortable: booli: NP_TypeKeysdefault: Option<Box<f32>>
Double

Fields of Double

sortable: booli: NP_TypeKeysdefault: Option<Box<f64>>
Decimal

Fields of Decimal

sortable: booli: NP_TypeKeysdefault: Option<Box<NP_Dec>>exp: u8
Boolean

Fields of Boolean

sortable: booli: NP_TypeKeysdefault: Option<Box<bool>>
Geo

Fields of Geo

sortable: booli: NP_TypeKeysdefault: Option<Box<NP_Geo>>size: u8
Date

Fields of Date

sortable: booli: NP_TypeKeysdefault: Option<Box<NP_Date>>
Enum

Fields of Enum

sortable: booli: NP_TypeKeysdefault: Option<Box<u8>>choices: Vec<String>
Uuid

Fields of Uuid

sortable: booli: NP_TypeKeys
Ulid

Fields of Ulid

sortable: booli: NP_TypeKeys
Table

Fields of Table

sortable: booli: NP_TypeKeyscolumns: Vec<(u8, String, Box<NP_Parsed_Schema>)>
Map

Fields of Map

sortable: booli: NP_TypeKeysvalue: Box<NP_Parsed_Schema>
List

Fields of List

sortable: booli: NP_TypeKeysof: Box<NP_Parsed_Schema>
Tuple

Fields of Tuple

sortable: booli: NP_TypeKeysvalues: Vec<Box<NP_Parsed_Schema>>

Implementations

impl NP_Parsed_Schema[src]

pub fn get_type_key(&self) -> NP_TypeKeys[src]

Get the type key for this schema

pub fn into_type_data(&self) -> (u8, String, NP_TypeKeys)[src]

Get the type data fo a given schema value

pub fn is_sortable(&self) -> bool[src]

Return if this schema is sortable

Trait Implementations

impl Clone for NP_Parsed_Schema[src]

impl Debug for NP_Parsed_Schema[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.