Skip to main content

ItemResult

Trait ItemResult 

Source
pub(crate) trait ItemResult<K: Keyword> {
    // Required methods
    fn is_ok_with_annotation(&self) -> bool;
    fn is_ok_with_non_annotation(&self) -> bool;
    fn is_ok_with_kwd_in(&self, ks: &[K]) -> bool;
    fn is_ok_with_kwd_not_in(&self, ks: &[K]) -> bool;
    fn is_empty_line(&self) -> bool;

    // Provided method
    fn is_ok_with_kwd(&self, k: K) -> bool { ... }
}
Expand description

Extension trait for Result<Item> – makes it convenient to implement PauseAt predicates

Required Methods§

Source

fn is_ok_with_annotation(&self) -> bool

Return true if this is an ok result with an annotation.

Source

fn is_ok_with_non_annotation(&self) -> bool

Return true if this is an ok result with a non-annotation.

Source

fn is_ok_with_kwd_in(&self, ks: &[K]) -> bool

Return true if this is an ok result with a keyword in the slice ‘ks’

Source

fn is_ok_with_kwd_not_in(&self, ks: &[K]) -> bool

Return true if this is an ok result with a keyword not in the slice ‘ks’

Source

fn is_empty_line(&self) -> bool

Return true if this is an empty-line error.

Provided Methods§

Source

fn is_ok_with_kwd(&self, k: K) -> bool

Return true if this is an ok result with the keyword ‘k’

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, K: Keyword> ItemResult<K> for Result<Item<'a, K>>