Struct ansi_control_codes::ControlFunction
source · pub struct ControlFunction { /* private fields */ }
Expand description
An ansi control function defined in ECMA-48.
This struct implements the PartialEq
trait for String-like types (all types that implement AsRef<str>
).
It can be used to compare ControlFunctions with string-like values using ==
or !=
functions.
Example:
use ansi_control_codes::c0;
let some_string = String::from("\u{001B}");
if (c0::ESC == some_string) {
println!("ESC!")
}
Trait Implementations§
source§impl Debug for ControlFunction
impl Debug for ControlFunction
source§impl Display for ControlFunction
impl Display for ControlFunction
source§impl From<ControlFunction> for String
impl From<ControlFunction> for String
source§fn from(control_function: ControlFunction) -> Self
fn from(control_function: ControlFunction) -> Self
Converts to this type from the input type.
source§impl<T> PartialEq<T> for ControlFunction
impl<T> PartialEq<T> for ControlFunction
source§impl PartialEq for ControlFunction
impl PartialEq for ControlFunction
source§fn eq(&self, other: &ControlFunction) -> bool
fn eq(&self, other: &ControlFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ControlFunction
Auto Trait Implementations§
impl RefUnwindSafe for ControlFunction
impl Send for ControlFunction
impl Sync for ControlFunction
impl Unpin for ControlFunction
impl UnwindSafe for ControlFunction
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