Struct linefeed::complete::Completion
source · Expand description
Represents a single possible completion
Fields
completion: String
Whole completion text
display: Option<String>
Listing display string; None
if matches completion
suffix: Suffix
Completion suffix; replaces append character
Implementations
sourceimpl Completion
impl Completion
sourcepub fn simple(s: String) -> Completion
pub fn simple(s: String) -> Completion
Returns a simple Completion
value, with display string matching
completion and using the default completion suffix.
sourcepub fn completion(&self, def_suffix: Option<char>) -> Cow<'_, str>
pub fn completion(&self, def_suffix: Option<char>) -> Cow<'_, str>
Returns the full completion string, including suffix, using the given default suffix if one is not assigned to this completion.
sourcepub fn display_chars(&self) -> usize
pub fn display_chars(&self) -> usize
Returns the number of characters displayed
Trait Implementations
sourceimpl Clone for Completion
impl Clone for Completion
sourcefn clone(&self) -> Completion
fn clone(&self) -> Completion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for Completion
impl Send for Completion
impl Sync for Completion
impl Unpin for Completion
impl UnwindSafe for Completion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more