[−][src]Struct querable::default::DefaultTokenizer
DefaultTokenizer have a format query likes :
// [0].test.[1] // test.test.[1]
Trait Implementations
impl Tokenizer for DefaultTokenizer
[src]
fn index_parse(key: &str) -> Result<usize, IndexError>
[src]
Parse index array.
- should starts and end with '[' and ']'. No space allowed.
use querable::{types::Tokenizer, default::DefaultTokenizer, error::{IndexError}}; assert_eq!(DefaultTokenizer::index_parse("[]"), Err(IndexError::ParseError(String::from("[]"))));
- index should be an integer, specificially, in the range of usize.
use querable::{types::Tokenizer, default::DefaultTokenizer}; assert!(DefaultTokenizer::index_parse("[x]").is_err());
fn dict_parse(key: &str) -> Result<State, KeyError>
[src]
Parse key/path index.
- shouldn't be an empty string or being prefixed & suffixed with empty string.
use querable::{types::Tokenizer, default::DefaultTokenizer, error::{KeyError}}; assert_eq!(DefaultTokenizer::dict_parse(" .test"), Err(KeyError::ParseError(String::from(" ")))); assert_eq!(DefaultTokenizer::dict_parse(""), Err(KeyError::EmptyKey));
Auto Trait Implementations
impl Send for DefaultTokenizer
impl Sync for DefaultTokenizer
impl Unpin for DefaultTokenizer
impl UnwindSafe for DefaultTokenizer
impl RefUnwindSafe for DefaultTokenizer
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,