KeySeg

Trait KeySeg 

Source
pub trait KeySeg {
    // Required methods
    fn parse(string: String) -> Result<Self>
       where Self: Sized;
    fn raw(&self) -> String;
    fn to_db_key(&self) -> DbKeySeg;
}
Expand description

Represents a segment in a path that may be used as a database key

Required Methods§

Source

fn parse(string: String) -> Result<Self>
where Self: Sized,

Reverse of into_string. Convert key segment to Self.

Source

fn raw(&self) -> String

Convert Self to a string.

Source

fn to_db_key(&self) -> DbKeySeg

Convert Self to a key segment. This mapping should preserve the ordering of Self

Implementations on Foreign Types§

Source§

impl KeySeg for i8

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for i16

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for i32

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for i64

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for i128

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for u8

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for u16

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for u32

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for u64

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Source§

impl KeySeg for u128

Source§

fn parse(string: String) -> Result<Self>

Source§

fn raw(&self) -> String

Source§

fn to_db_key(&self) -> DbKeySeg

Implementors§