[][src]Struct newt::callbacks::HelpCallback

pub struct HelpCallback<FN, T> where
    FN: FnMut(&Form, Option<&T>), 
{ /* fields omitted */ }

A callback called when F1 is pressed while a Form is running.

Methods

impl<FN, T> HelpCallback<FN, T> where
    FN: FnMut(&Form, Option<&T>), 
[src]

pub fn new(
    _scrollbar: Option<&VerticalScrollbar>,
    form_flags: i32,
    function: FN,
    data: Option<T>
) -> (Form, Box<HelpCallback<FN, T>>)
[src]

Initialize a new Form and associate the function or closure function as a HelpCallback. The callback will be executed when F1 is pressed while the Form is running. The new Form and HelpCallback are returned as a tuple pair.

  • _scrollbar - A VerticalScrollbar to be attached to the created form unused.
  • form_flags - The flags the form is to be initialized with.
  • function - The function or closure to associate with the Form.
  • data - The optional user data to pass to the function.

Auto Trait Implementations

impl<FN, T> Send for HelpCallback<FN, T> where
    FN: Send,
    T: Send

impl<FN, T> Sync for HelpCallback<FN, T> where
    FN: Sync,
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]