Skip to main content

Hint

Trait Hint 

Source
pub trait Hint {
    // Required methods
    fn display(&self) -> &str;
    fn completion(&self) -> Option<&str>;
}
Expand description

A hint returned by Hinter

Required Methods§

Source

fn display(&self) -> &str

Text to display when hint is active

Source

fn completion(&self) -> Option<&str>

Text to insert in line when right arrow is pressed

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: AsRef<str>> Hint for T