Struct rustyline::validate::MatchingBracketValidator
source · pub struct MatchingBracketValidator { /* private fields */ }
Expand description
Simple matching bracket validator.
Implementations§
Trait Implementations§
source§impl Default for MatchingBracketValidator
impl Default for MatchingBracketValidator
source§fn default() -> MatchingBracketValidator
fn default() -> MatchingBracketValidator
Returns the “default value” for a type. Read more
source§impl Validator for MatchingBracketValidator
impl Validator for MatchingBracketValidator
source§fn validate(&self, ctx: &mut ValidationContext<'_>) -> Result<ValidationResult>
fn validate(&self, ctx: &mut ValidationContext<'_>) -> Result<ValidationResult>
Takes the currently edited
input
and returns a
ValidationResult
indicating whether it is valid or not along
with an option message to display about the result. The most
common validity check to implement is probably whether the
input is complete or not, for instance ensuring that all
delimiters are fully balanced. Read moresource§fn validate_while_typing(&self) -> bool
fn validate_while_typing(&self) -> bool
Configure whether validation is performed while typing or only
when user presses the Enter key. Read more
Auto Trait Implementations§
impl Freeze for MatchingBracketValidator
impl RefUnwindSafe for MatchingBracketValidator
impl Send for MatchingBracketValidator
impl Sync for MatchingBracketValidator
impl Unpin for MatchingBracketValidator
impl UnwindSafe for MatchingBracketValidator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more