[][src]Trait rustyline::hint::Hinter

pub trait Hinter {
    type Hint: Hint + 'static;
    pub fn hint(
        &self,
        line: &str,
        pos: usize,
        ctx: &Context<'_>
    ) -> Option<Self::Hint> { ... } }

Hints provider

Associated Types

type Hint: Hint + 'static[src]

Specific hint type

Loading content...

Provided methods

pub fn hint(
    &self,
    line: &str,
    pos: usize,
    ctx: &Context<'_>
) -> Option<Self::Hint>
[src]

Takes the currently edited line with the cursor position and returns the string that should be displayed or None if no hint is available for the text the user currently typed.

Loading content...

Implementations on Foreign Types

impl Hinter for ()[src]

type Hint = String

impl<'r, H: ?Sized + Hinter> Hinter for &'r H[src]

type Hint = H::Hint

Loading content...

Implementors

impl Hinter for HistoryHinter[src]

type Hint = String

Loading content...