KeySeg

Trait KeySeg 

Source
pub trait KeySeg {
    // Required methods
    fn parse(string: String) -> Result<Self, Error>
       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, Error>
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§

impl KeySeg for i16

Source§

impl KeySeg for i32

Source§

impl KeySeg for i64

Source§

impl KeySeg for i128

Source§

impl KeySeg for u8

Source§

impl KeySeg for u16

Source§

impl KeySeg for u32

Source§

impl KeySeg for u64

Source§

impl KeySeg for u128

Source§

impl KeySeg for String

Implementors§