[][src]Struct qt_widgets::QItemDelegate

#[repr(C)]pub struct QItemDelegate { /* fields omitted */ }

The QItemDelegate class provides display and editing facilities for data items from a model.

C++ class: QItemDelegate.

C++ documentation:

The QItemDelegate class provides display and editing facilities for data items from a model.

QItemDelegate can be used to provide custom display features and editor widgets for item views based on QAbstractItemView subclasses. Using a delegate for this purpose allows the display and editing mechanisms to be customized and developed independently from the model and view.

The QItemDelegate class is one of the Model/View Classes and is part of Qt's model/view framework. Note that QStyledItemDelegate has taken over the job of drawing Qt's item views. We recommend the use of QStyledItemDelegate when creating new delegates.

When displaying items from a custom model in a standard view, it is often sufficient to simply ensure that the model returns appropriate data for each of the roles that determine the appearance of items in views. The default delegate used by Qt's standard views uses this role information to display items in most of the common forms expected by users. However, it is sometimes necessary to have even more control over the appearance of items than the default delegate can provide.

This class provides default implementations of the functions for painting item data in a view and editing data from item models. Default implementations of the paint() and sizeHint() virtual functions, defined in QAbstractItemDelegate, are provided to ensure that the delegate implements the correct basic behavior expected by views. You can reimplement these functions in subclasses to customize the appearance of items.

When editing data in an item view, QItemDelegate provides an editor widget, which is a widget that is placed on top of the view while editing takes place. Editors are created with a QItemEditorFactory; a default static instance provided by QItemEditorFactory is installed on all item delegates. You can set a custom factory using setItemEditorFactory() or set a new default factory with QItemEditorFactory::setDefaultFactory(). It is the data stored in the item model with the Qt::EditRole that is edited.

Only the standard editing functions for widget-based delegates are reimplemented here:

  • createEditor() returns the widget used to change data from the model and can be reimplemented to customize editing behavior.
  • setEditorData() provides the widget with data to manipulate.
  • updateEditorGeometry() ensures that the editor is displayed correctly with respect to the item view.
  • setModelData() returns updated data to the model.

The closeEditor() signal indicates that the user has completed editing the data, and that the editor widget can be destroyed.

Methods

impl QItemDelegate[src]

pub unsafe fn create_editor(
    &self,
    parent: impl CastInto<Ptr<QWidget>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> QPtr<QWidget>
[src]

Reimplemented from QAbstractItemDelegate::createEditor().

Calls C++ function: virtual QWidget* QItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::createEditor().

Returns the widget used to edit the item specified by index for editing. The parent widget and style option are used to control how the editor widget appears.

See also QAbstractItemDelegate::createEditor().

pub unsafe fn has_clipping(&self) -> bool[src]

if the delegate should clip the paint events

Calls C++ function: bool QItemDelegate::hasClipping() const.

C++ documentation:

if the delegate should clip the paint events

This property will set the paint clip to the size of the item. The default value is on. It is useful for cases such as when images are larger than the size of the item.

This property was introduced in Qt 4.2.

Access functions:

bool hasClipping() const
void setClipping(bool clip)

pub unsafe fn item_editor_factory(&self) -> Ptr<QItemEditorFactory>[src]

Returns the editor factory used by the item delegate. If no editor factory is set, the function will return null.

Calls C++ function: QItemEditorFactory* QItemDelegate::itemEditorFactory() const.

C++ documentation:

Returns the editor factory used by the item delegate. If no editor factory is set, the function will return null.

See also setItemEditorFactory().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QItemDelegate::metaObject() const.

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QObject>>) -> QBox<QItemDelegate>[src]

Constructs an item delegate with the given parent.

Calls C++ function: [constructor] void QItemDelegate::QItemDelegate(QObject* parent = …).

C++ documentation:

Constructs an item delegate with the given parent.

pub unsafe fn new_0a() -> QBox<QItemDelegate>[src]

The QItemDelegate class provides display and editing facilities for data items from a model.

Calls C++ function: [constructor] void QItemDelegate::QItemDelegate().

C++ documentation:

The QItemDelegate class provides display and editing facilities for data items from a model.

QItemDelegate can be used to provide custom display features and editor widgets for item views based on QAbstractItemView subclasses. Using a delegate for this purpose allows the display and editing mechanisms to be customized and developed independently from the model and view.

The QItemDelegate class is one of the Model/View Classes and is part of Qt's model/view framework. Note that QStyledItemDelegate has taken over the job of drawing Qt's item views. We recommend the use of QStyledItemDelegate when creating new delegates.

When displaying items from a custom model in a standard view, it is often sufficient to simply ensure that the model returns appropriate data for each of the roles that determine the appearance of items in views. The default delegate used by Qt's standard views uses this role information to display items in most of the common forms expected by users. However, it is sometimes necessary to have even more control over the appearance of items than the default delegate can provide.

This class provides default implementations of the functions for painting item data in a view and editing data from item models. Default implementations of the paint() and sizeHint() virtual functions, defined in QAbstractItemDelegate, are provided to ensure that the delegate implements the correct basic behavior expected by views. You can reimplement these functions in subclasses to customize the appearance of items.

When editing data in an item view, QItemDelegate provides an editor widget, which is a widget that is placed on top of the view while editing takes place. Editors are created with a QItemEditorFactory; a default static instance provided by QItemEditorFactory is installed on all item delegates. You can set a custom factory using setItemEditorFactory() or set a new default factory with QItemEditorFactory::setDefaultFactory(). It is the data stored in the item model with the Qt::EditRole that is edited.

Only the standard editing functions for widget-based delegates are reimplemented here:

  • createEditor() returns the widget used to change data from the model and can be reimplemented to customize editing behavior.
  • setEditorData() provides the widget with data to manipulate.
  • updateEditorGeometry() ensures that the editor is displayed correctly with respect to the item view.
  • setModelData() returns updated data to the model.

The closeEditor() signal indicates that the user has completed editing the data, and that the editor widget can be destroyed.

pub unsafe fn paint(
    &self,
    painter: impl CastInto<Ptr<QPainter>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Reimplemented from QAbstractItemDelegate::paint().

Calls C++ function: virtual void QItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::paint().

Renders the delegate using the given painter and style option for the item specified by index.

When reimplementing this function in a subclass, you should update the area held by the option's rect variable, using the option's state variable to determine the state of the item to be displayed, and adjust the way it is painted accordingly.

For example, a selected item may need to be displayed differently to unselected items, as shown in the following code:

if (option.state & QStyle::State_Selected) painter->fillRect(option.rect, option.palette.highlight());

int size = qMin(option.rect.width(), option.rect.height()); int brightness = index.model()->data(index, Qt::DisplayRole).toInt(); double radius = (size / 2.0) - (brightness / 255.0 * size / 2.0); if (radius == 0.0) return;

painter->save(); painter->setRenderHint(QPainter::Antialiasing, true); painter->setPen(Qt::NoPen); if (option.state & QStyle::State_Selected) painter->setBrush(option.palette.highlightedText()); else ...

After painting, you should ensure that the painter is returned to its the state it was supplied in when this function was called. For example, it may be useful to call QPainter::save() before painting and QPainter::restore() afterwards.

See also QStyle::State.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QItemDelegate::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QItemDelegate::qt_metacast(const char* arg1).

pub unsafe fn set_clipping(&self, clip: bool)[src]

if the delegate should clip the paint events

Calls C++ function: void QItemDelegate::setClipping(bool clip).

C++ documentation:

if the delegate should clip the paint events

This property will set the paint clip to the size of the item. The default value is on. It is useful for cases such as when images are larger than the size of the item.

This property was introduced in Qt 4.2.

Access functions:

bool hasClipping() const
void setClipping(bool clip)

pub unsafe fn set_editor_data(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Reimplemented from QAbstractItemDelegate::setEditorData().

Calls C++ function: virtual void QItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::setEditorData().

Sets the data to be displayed and edited by the editor from the data model item specified by the model index.

The default implementation stores the data in the editor widget's user property.

See also QMetaProperty::isUser().

pub unsafe fn set_item_editor_factory(
    &self,
    factory: impl CastInto<Ptr<QItemEditorFactory>>
)
[src]

Sets the editor factory to be used by the item delegate to be the factory specified. If no editor factory is set, the item delegate will use the default editor factory.

Calls C++ function: void QItemDelegate::setItemEditorFactory(QItemEditorFactory* factory).

C++ documentation:

Sets the editor factory to be used by the item delegate to be the factory specified. If no editor factory is set, the item delegate will use the default editor factory.

See also itemEditorFactory().

pub unsafe fn set_model_data(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    model: impl CastInto<Ptr<QAbstractItemModel>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Reimplemented from QAbstractItemDelegate::setModelData().

Calls C++ function: virtual void QItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::setModelData().

Gets data from the editor widget and stores it in the specified model at the item index.

The default implementation gets the value to be stored in the data model from the editor widget's user property.

See also QMetaProperty::isUser().

pub unsafe fn size_hint(
    &self,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QSize>
[src]

Reimplemented from QAbstractItemDelegate::sizeHint().

Calls C++ function: virtual QSize QItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::sizeHint().

Returns the size needed by the delegate to display the item specified by index, taking into account the style information provided by option.

When reimplementing this function, note that in case of text items, QItemDelegate adds a margin (i.e. 2 * QStyle::PM_FocusFrameHMargin) to the length of the text.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QItemDelegate::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QItemDelegate::trUtf8(const char* s, const char* c, int n).

pub unsafe fn update_editor_geometry(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Reimplemented from QAbstractItemDelegate::updateEditorGeometry().

Calls C++ function: virtual void QItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Reimplemented from QAbstractItemDelegate::updateEditorGeometry().

Updates the editor for the item specified by index according to the style option given.

Methods from Deref<Target = QAbstractItemDelegate>

pub fn commit_data(&self) -> Signal<(*mut QWidget,)>[src]

This signal must be emitted when the editor widget has completed editing the data, and wants to write it back into the model.

Returns a built-in Qt signal QAbstractItemDelegate::commitData that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal must be emitted when the editor widget has completed editing the data, and wants to write it back into the model.

pub fn close_editor(&self) -> Signal<(*mut QWidget, EndEditHint)>[src]

This signal is emitted when the user has finished editing an item using the specified editor.

Returns a built-in Qt signal QAbstractItemDelegate::closeEditor that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user has finished editing an item using the specified editor.

The hint provides a way for the delegate to influence how the model and view behave after editing is completed. It indicates to these components what action should be performed next to provide a comfortable editing experience for the user. For example, if EditNextItem is specified, the view should use a delegate to open an editor on the next item in the model.

See also EndEditHint.

pub fn size_hint_changed(&self) -> Signal<(*const QModelIndex,)>[src]

This signal must be emitted when the sizeHint() of index changed.

Returns a built-in Qt signal QAbstractItemDelegate::sizeHintChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal must be emitted when the sizeHint() of index changed.

Views automatically connect to this signal and relayout items as necessary.

This function was introduced in Qt 4.4.

pub unsafe fn create_editor(
    &self,
    parent: impl CastInto<Ptr<QWidget>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> QPtr<QWidget>
[src]

Returns the editor to be used for editing the data item with the given index. Note that the index contains information about the model being used. The editor's parent widget is specified by parent, and the item options by option.

Calls C++ function: virtual QWidget* QAbstractItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Returns the editor to be used for editing the data item with the given index. Note that the index contains information about the model being used. The editor's parent widget is specified by parent, and the item options by option.

The base implementation returns 0. If you want custom editing you will need to reimplement this function.

The returned editor widget should have Qt::StrongFocus; otherwise, QMouseEvents received by the widget will propagate to the view. The view's background will shine through unless the editor paints its own background (e.g., with setAutoFillBackground()).

See also destroyEditor(), setModelData(), and setEditorData().

pub unsafe fn destroy_editor(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Called when the editor is no longer needed for editing the data item with the given index and should be destroyed. The default behavior is a call to deleteLater on the editor. It is possible e.g. to avoid this delete by reimplementing this function.

Calls C++ function: virtual void QAbstractItemDelegate::destroyEditor(QWidget* editor, const QModelIndex& index) const.

C++ documentation:

Called when the editor is no longer needed for editing the data item with the given index and should be destroyed. The default behavior is a call to deleteLater on the editor. It is possible e.g. to avoid this delete by reimplementing this function.

This function was introduced in Qt 5.0.

See also createEditor().

pub unsafe fn editor_event(
    &self,
    event: impl CastInto<Ptr<QEvent>>,
    model: impl CastInto<Ptr<QAbstractItemModel>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

When editing of an item starts, this function is called with the event that triggered the editing, the model, the index of the item, and the option used for rendering the item.

Calls C++ function: virtual bool QAbstractItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index).

C++ documentation:

When editing of an item starts, this function is called with the event that triggered the editing, the model, the index of the item, and the option used for rendering the item.

Mouse events are sent to editorEvent() even if they don't start editing of the item. This can, for instance, be useful if you wish to open a context menu when the right mouse button is pressed on an item.

The base implementation returns false (indicating that it has not handled the event).

pub unsafe fn help_event(
    &self,
    event: impl CastInto<Ptr<QHelpEvent>>,
    view: impl CastInto<Ptr<QAbstractItemView>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> bool
[src]

Whenever a help event occurs, this function is called with the event view option and the index that corresponds to the item where the event occurs.

Calls C++ function: virtual bool QAbstractItemDelegate::helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index).

C++ documentation:

Whenever a help event occurs, this function is called with the event view option and the index that corresponds to the item where the event occurs.

Returns true if the delegate can handle the event; otherwise returns false. A return value of true indicates that the data obtained using the index had the required role.

For QEvent::ToolTip and QEvent::WhatsThis events that were handled successfully, the relevant popup may be shown depending on the user's system configuration.

This function was introduced in Qt 4.3.

See also QHelpEvent.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QAbstractItemDelegate::metaObject() const.

pub unsafe fn paint(
    &self,
    painter: impl CastInto<Ptr<QPainter>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

This pure abstract function must be reimplemented if you want to provide custom rendering. Use the painter and style option to render the item specified by the item index.

Calls C++ function: pure virtual void QAbstractItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

This pure abstract function must be reimplemented if you want to provide custom rendering. Use the painter and style option to render the item specified by the item index.

If you reimplement this you must also reimplement sizeHint().

pub unsafe fn painting_roles(&self) -> CppBox<QVectorOfInt>[src]

Calls C++ function: virtual QVector<int> QAbstractItemDelegate::paintingRoles() const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QAbstractItemDelegate::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QAbstractItemDelegate::qt_metacast(const char* arg1).

pub unsafe fn set_editor_data(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Sets the contents of the given editor to the data for the item at the given index. Note that the index contains information about the model being used.

Calls C++ function: virtual void QAbstractItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const.

C++ documentation:

Sets the contents of the given editor to the data for the item at the given index. Note that the index contains information about the model being used.

The base implementation does nothing. If you want custom editing you will need to reimplement this function.

See also setModelData().

pub unsafe fn set_model_data(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    model: impl CastInto<Ptr<QAbstractItemModel>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Sets the data for the item at the given index in the model to the contents of the given editor.

Calls C++ function: virtual void QAbstractItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const.

C++ documentation:

Sets the data for the item at the given index in the model to the contents of the given editor.

The base implementation does nothing. If you want custom editing you will need to reimplement this function.

See also setEditorData().

pub unsafe fn size_hint(
    &self,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QSize>
[src]

This pure abstract function must be reimplemented if you want to provide custom rendering. The options are specified by option and the model item by index.

Calls C++ function: pure virtual QSize QAbstractItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

This pure abstract function must be reimplemented if you want to provide custom rendering. The options are specified by option and the model item by index.

If you reimplement this you must also reimplement paint().

pub unsafe fn update_editor_geometry(
    &self,
    editor: impl CastInto<Ptr<QWidget>>,
    option: impl CastInto<Ref<QStyleOptionViewItem>>,
    index: impl CastInto<Ref<QModelIndex>>
)
[src]

Updates the geometry of the editor for the item with the given index, according to the rectangle specified in the option. If the item has an internal layout, the editor will be laid out accordingly. Note that the index contains information about the model being used.

Calls C++ function: virtual void QAbstractItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const.

C++ documentation:

Updates the geometry of the editor for the item with the given index, according to the rectangle specified in the option. If the item has an internal layout, the editor will be laid out accordingly. Note that the index contains information about the model being used.

The base implementation does nothing. If you want custom editing you must reimplement this function.

Trait Implementations

impl CppDeletable for QItemDelegate[src]

unsafe fn delete(&self)[src]

Destroys the item delegate.

Calls C++ function: virtual [destructor] void QItemDelegate::~QItemDelegate().

C++ documentation:

Destroys the item delegate.

impl Deref for QItemDelegate[src]

type Target = QAbstractItemDelegate

The resulting type after dereferencing.

fn deref(&self) -> &QAbstractItemDelegate[src]

Calls C++ function: QAbstractItemDelegate* static_cast<QAbstractItemDelegate*>(QItemDelegate* ptr).

impl DynamicCast<QItemDelegate> for QAbstractItemDelegate[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractItemDelegate>) -> Ptr<QItemDelegate>[src]

Calls C++ function: QItemDelegate* dynamic_cast<QItemDelegate*>(QAbstractItemDelegate* ptr).

impl DynamicCast<QItemDelegate> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QItemDelegate>[src]

Calls C++ function: QItemDelegate* dynamic_cast<QItemDelegate*>(QObject* ptr).

impl StaticDowncast<QItemDelegate> for QAbstractItemDelegate[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractItemDelegate>) -> Ptr<QItemDelegate>[src]

Calls C++ function: QItemDelegate* static_cast<QItemDelegate*>(QAbstractItemDelegate* ptr).

impl StaticDowncast<QItemDelegate> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QItemDelegate>[src]

Calls C++ function: QItemDelegate* static_cast<QItemDelegate*>(QObject* ptr).

impl StaticUpcast<QAbstractItemDelegate> for QItemDelegate[src]

unsafe fn static_upcast(ptr: Ptr<QItemDelegate>) -> Ptr<QAbstractItemDelegate>[src]

Calls C++ function: QAbstractItemDelegate* static_cast<QAbstractItemDelegate*>(QItemDelegate* ptr).

impl StaticUpcast<QObject> for QItemDelegate[src]

unsafe fn static_upcast(ptr: Ptr<QItemDelegate>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QItemDelegate* ptr).

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

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

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

impl<T> StaticUpcast<T> for 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.