Struct unsegen::input::EditBehavior [−][src]
pub struct EditBehavior<'a, E: Editable + 'a> { /* fields omitted */ }
Expand description
Collection of triggers for functions of something Editable
implementing Behavior
.
Implementations
impl<'a, E: Editable> EditBehavior<'a, E>
[src]
impl<'a, E: Editable> EditBehavior<'a, E>
[src]pub fn new(editable: &'a mut E) -> Self
[src]
pub fn new(editable: &'a mut E) -> Self
[src]Create the behavior to act on the provided Editable
. Add triggers using other functions!
pub fn up_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn up_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the move_up
function on the provided event.
A typical candidate for event
would be Key::Up
.
pub fn down_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn down_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the move_down
function on the provided event.
A typical candidate for event
would be Key::Down
.
pub fn left_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn left_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the move_left
function on the provided event.
A typical candidate for event
would be Key::Left
.
pub fn right_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn right_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the move_right
function on the provided event.
A typical candidate for event
would be Key::Right
.
pub fn delete_forwards_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn delete_forwards_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the delete_forwards
function on the provided event.
A typical candidate for event
would be Key::Delete
.
pub fn delete_backwards_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn delete_backwards_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the delete_backwards
function on the provided event.
A typical candidate for event
would be Key::Backspace
.
pub fn clear_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn clear_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the clear
function on the provided event.
pub fn go_to_beginning_of_line_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn go_to_beginning_of_line_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the go_to_beginning_of_line
function on the provided event.
A typical candidate for event
would be Key::Home
.
pub fn go_to_end_of_line_on<T: ToEvent>(self, event: T) -> Self
[src]
pub fn go_to_end_of_line_on<T: ToEvent>(self, event: T) -> Self
[src]Make the behavior trigger the go_to_end_of_line_on
function on the provided event.
A typical candidate for event
would be Key::End
.
Trait Implementations
Auto Trait Implementations
impl<'a, E> RefUnwindSafe for EditBehavior<'a, E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<'a, E> Send for EditBehavior<'a, E> where
E: Send,
E: Send,
impl<'a, E> Sync for EditBehavior<'a, E> where
E: Sync,
E: Sync,