#[repr(C)]pub struct cmd_line_frontend_interface {
pub write: Option<unsafe extern "C" fn(obj: *mut conf_object_t, str_: *const c_char)>,
pub delete_line: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
pub disconnect: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
pub cursor_left: Option<unsafe extern "C" fn(obj: *mut conf_object_t, num: c_int)>,
pub cursor_right: Option<unsafe extern "C" fn(obj: *mut conf_object_t, num: c_int)>,
pub clear_screen: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
pub prompt_end: Option<unsafe extern "C" fn(obj: *mut conf_object_t, pos: c_int)>,
pub bell: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>,
}
Fields§
§write: Option<unsafe extern "C" fn(obj: *mut conf_object_t, str_: *const c_char)>
write a character on the command line at the current cursor position, overwriting any existing character there
delete_line: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
deletes the line from current position to the end of the line
disconnect: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
§cursor_left: Option<unsafe extern "C" fn(obj: *mut conf_object_t, num: c_int)>
moves the cursor num characters to the left.
cursor_right: Option<unsafe extern "C" fn(obj: *mut conf_object_t, num: c_int)>
moves the cursor num characters to the right.
clear_screen: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
clears the screen and moves the cursor to position 0. Optional, may be NULL if not implemented.
prompt_end: Option<unsafe extern "C" fn(obj: *mut conf_object_t, pos: c_int)>
called when the prompt has been printed with the position on the line of the first non-prompt character. Optional, may be null if not implemented
bell: Option<unsafe extern "C" fn(obj: *mut conf_object_t)>
optional
Trait Implementations§
source§impl Clone for cmd_line_frontend_interface
impl Clone for cmd_line_frontend_interface
source§fn clone(&self) -> cmd_line_frontend_interface
fn clone(&self) -> cmd_line_frontend_interface
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for cmd_line_frontend_interface
impl Debug for cmd_line_frontend_interface
source§impl Default for cmd_line_frontend_interface
impl Default for cmd_line_frontend_interface
source§fn default() -> cmd_line_frontend_interface
fn default() -> cmd_line_frontend_interface
Returns the “default value” for a type. Read more
source§impl Hash for cmd_line_frontend_interface
impl Hash for cmd_line_frontend_interface
source§impl Ord for cmd_line_frontend_interface
impl Ord for cmd_line_frontend_interface
source§fn cmp(&self, other: &cmd_line_frontend_interface) -> Ordering
fn cmp(&self, other: &cmd_line_frontend_interface) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialOrd for cmd_line_frontend_interface
impl PartialOrd for cmd_line_frontend_interface
impl Copy for cmd_line_frontend_interface
impl Eq for cmd_line_frontend_interface
impl StructuralPartialEq for cmd_line_frontend_interface
Auto Trait Implementations§
impl Freeze for cmd_line_frontend_interface
impl RefUnwindSafe for cmd_line_frontend_interface
impl Send for cmd_line_frontend_interface
impl Sync for cmd_line_frontend_interface
impl Unpin for cmd_line_frontend_interface
impl UnwindSafe for cmd_line_frontend_interface
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)