[][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<String>,
        size: u16,
    },
    Bytes {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<Vec<u8>>,
        size: u16,
    },
    Int8 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<i8>,
    },
    Int16 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<i16>,
    },
    Int32 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<i32>,
    },
    Int64 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<i64>,
    },
    Uint8 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<u8>,
    },
    Uint16 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<u16>,
    },
    Uint32 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<u32>,
    },
    Uint64 {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<u64>,
    },
    Float {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<f32>,
    },
    Double {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<f64>,
    },
    Decimal {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<NP_Dec>,
        exp: u8,
    },
    Boolean {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<bool>,
    },
    Geo {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<NP_Geo>,
        size: u8,
    },
    Date {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<NP_Date>,
    },
    Enum {
        sortable: bool,
        i: NP_TypeKeys,
        default: Option<NP_Enum>,
        choices: Vec<NP_Enum>,
    },
    Uuid {
        sortable: bool,
        i: NP_TypeKeys,
    },
    Ulid {
        sortable: bool,
        i: NP_TypeKeys,
    },
    Table {
        sortable: bool,
        i: NP_TypeKeys,
        columns: Vec<(u8, String, NP_Schema_Addr)>,
    },
    Map {
        sortable: bool,
        i: NP_TypeKeys,
        value: NP_Schema_Addr,
    },
    List {
        sortable: bool,
        i: NP_TypeKeys,
        of: NP_Schema_Addr,
    },
    Tuple {
        sortable: bool,
        i: NP_TypeKeys,
        values: Vec<NP_Schema_Addr>,
    },
}

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<String>size: u16
Bytes

Fields of Bytes

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

Fields of Int8

sortable: booli: NP_TypeKeysdefault: Option<i8>
Int16

Fields of Int16

sortable: booli: NP_TypeKeysdefault: Option<i16>
Int32

Fields of Int32

sortable: booli: NP_TypeKeysdefault: Option<i32>
Int64

Fields of Int64

sortable: booli: NP_TypeKeysdefault: Option<i64>
Uint8

Fields of Uint8

sortable: booli: NP_TypeKeysdefault: Option<u8>
Uint16

Fields of Uint16

sortable: booli: NP_TypeKeysdefault: Option<u16>
Uint32

Fields of Uint32

sortable: booli: NP_TypeKeysdefault: Option<u32>
Uint64

Fields of Uint64

sortable: booli: NP_TypeKeysdefault: Option<u64>
Float

Fields of Float

sortable: booli: NP_TypeKeysdefault: Option<f32>
Double

Fields of Double

sortable: booli: NP_TypeKeysdefault: Option<f64>
Decimal

Fields of Decimal

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

Fields of Boolean

sortable: booli: NP_TypeKeysdefault: Option<bool>
Geo

Fields of Geo

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

Fields of Date

sortable: booli: NP_TypeKeysdefault: Option<NP_Date>
Enum

Fields of Enum

sortable: booli: NP_TypeKeysdefault: Option<NP_Enum>choices: Vec<NP_Enum>
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, NP_Schema_Addr)>
Map

Fields of Map

sortable: booli: NP_TypeKeysvalue: NP_Schema_Addr
List

Fields of List

sortable: booli: NP_TypeKeysof: NP_Schema_Addr
Tuple

Fields of Tuple

sortable: booli: NP_TypeKeysvalues: Vec<NP_Schema_Addr>

Implementations

impl NP_Parsed_Schema[src]

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

Get the type key for this schema

pub fn get_type_data(&self) -> (&str, 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.