Enum WidgetMessage

Source
pub enum WidgetMessage {
Show 55 variants MouseDown { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, button: MouseButton, }, MouseUp { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, button: MouseButton, }, MouseMove { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, state: MouseState, }, MouseWheel { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, amount: f32, }, MouseLeave, MouseEnter, Text(String), KeyDown(KeyCode), KeyUp(KeyCode), Focus, Unfocus, DragStarted(Handle<UiNode>), DragOver(Handle<UiNode>), Drop(Handle<UiNode>), Topmost, Lowermost, Unlink, Remove, LinkWith(Handle<UiNode>), LinkWithReverse(Handle<UiNode>), ReplaceChildren(Vec<Handle<UiNode>>), Background(StyledProperty<Brush>), Foreground(StyledProperty<Brush>), Name(String), Width(f32), Height(f32), VerticalAlignment(VerticalAlignment), HorizontalAlignment(HorizontalAlignment), MaxSize(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>), MinSize(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>), Row(usize), Column(usize), Margin(Thickness), HitTestVisibility(bool), Visibility(bool), ZIndex(usize), DesiredPosition(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>), Align { relative_to: Handle<UiNode>, horizontal_alignment: HorizontalAlignment, vertical_alignment: VerticalAlignment, margin: Thickness, }, Enabled(bool), Center, AdjustPositionToFit, Cursor(Option<CursorIcon>), Opacity(Option<f32>), LayoutTransform(Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>), RenderTransform(Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>), DoubleClick { button: MouseButton, }, ContextMenu(Option<RcUiNodeHandle>), Tooltip(Option<RcUiNodeHandle>), TouchStarted { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, }, TouchEnded { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, id: u64, }, TouchMoved { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, }, TouchCancelled { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, id: u64, }, DoubleTap { pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, }, SortChildren(SortingPredicate), Style(Resource<Style>),
}
Expand description

A set of messages for any kind of widgets (including user controls). These messages provides basic communication elements of the UI library.

Variants§

§

MouseDown

Initiated when user clicks on a widget’s geometry.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Position of cursor.

§button: MouseButton

A button that was pressed.

§

MouseUp

Initiated when user releases mouse button while cursor is over widget’s geometry.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Position of cursor.

§button: MouseButton

A button that was released.

§

MouseMove

Initiated when user moves cursor over widget’s geometry.

Direction: From/To UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

New position of cursor in screen coordinates.

§state: MouseState

State of mouse buttons.

§

MouseWheel

Initiated when user scrolls mouse wheel while cursor is over widget’s geometry.

Direction: From/To UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

Position of cursor.

§amount: f32

Amount of lines per mouse wheel turn.

§

MouseLeave

Initiated when cursor leaves geometry of a widget.

Direction: From UI.

§

MouseEnter

Initiated when cursor enters geometry of a widget.

Direction: From UI.

§

Text(String)

Initiated when widget is in focus and user types something on a keyboard.

Direction: From/To UI.

§

KeyDown(KeyCode)

Initiated when widget is in focus and user presses a button on a keyboard.

Direction: From UI.

§

KeyUp(KeyCode)

Initiated when widget is in focus and user releases a button on a keyboard.

Direction: From UI.

§

Focus

Initiated when widget received focus (when direction is MessageDirection::FromWidget). In most cases focus is received by clicking on widget. You can request focus explicitly by sending this message to a widget with MessageDirection::ToWidget

Direction: From UI/To UI.

§

Unfocus

Initiated when widget has lost its focus (when direction is MessageDirection::FromWidget). Can be used to removed focus from widget if sent with MessageDirection::ToWidget

Direction: From UI/To UI.

§

DragStarted(Handle<UiNode>)

Initiated when dragging of a widget has started.

Direction: From UI.

§

DragOver(Handle<UiNode>)

Initiated when user drags a widget over some other widget.

Direction: From UI.

§

Drop(Handle<UiNode>)

Initiated when user drops a widget onto some other widget.

Direction: From UI.

§

Topmost

A request to make widget topmost. Widget can be made topmost only in the same hierarchy level only!

Direction: From/To UI.

§

Lowermost

A request to make widget lowermost. Widget can be made lowermost only in the same hierarchy level only!

Direction: From/To UI.

A request to detach widget from its current parent and attach to root canvas.

Direction: From/To UI.

§

Remove

A request to delete widget with all its children widgets. All handles to a node and its children will be invalid after processing such message!

Direction: From/To UI.

§

LinkWith(Handle<UiNode>)

A request to link initiator with specified widget.

Direction: From/To UI.

§

LinkWithReverse(Handle<UiNode>)

A request to link initiator with specified widget and put it in front of children list.

Direction: From/To UI.

§

ReplaceChildren(Vec<Handle<UiNode>>)

A request to delete all the children widgets and replace them with the given nodes as the new child nodes.

Direction: To UI.

§

Background(StyledProperty<Brush>)

A request to change background brush of a widget. Background brushes are used to fill volume of widgets.

Direction: From/To UI

§

Foreground(StyledProperty<Brush>)

A request to change foreground brush of a widget. Foreground brushes are used for text, borders and so on.

Direction: From/To UI

§

Name(String)

A request to change name of a widget. Name is given to widget mostly for debugging purposes.

Direction: From/To UI

§

Width(f32)

A request to set width of a widget. In most cases there is no need to explicitly set width of a widget, because fyrox-ui uses automatic layout engine which will correctly calculate desired width of a widget.

Direction: From/To UI

§

Height(f32)

A request to set height of a widget. In most cases there is no need to explicitly set height of a widget, because fyrox-ui uses automatic layout engine which will correctly calculate desired height of a widget.

Direction: From/To UI

§

VerticalAlignment(VerticalAlignment)

A request to set vertical alignment of a widget. Vertical alignment tells where to put widget in the parent widget’s bounds in vertical direction.

Direction: From/To UI

§

HorizontalAlignment(HorizontalAlignment)

A request to set horizontal alignment of a widget. Horizontal alignment tells where to put widget in the parent widget’s bounds in horizontal direction.

Direction: From/To UI

§

MaxSize(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>)

A request to set maximum size of widget. Maximum size restricts size of a widget during layout pass. For example you can set maximum size to a button which was placed into a grid’s cell, if maximum size wouldn’t be set, button would be stretched to fill entire cell.

Direction: From/To UI

§

MinSize(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>)

A request to set minimum size of widget. Minimum size restricts size of a widget during layout pass. For example you can set minimum size to a button which was placed into a grid’s cell, if minimum size wouldn’t be set, button would be compressed to fill entire cell.

Direction: From/To UI

§

Row(usize)

A request to set row number of a grid to which widget should belong to.

Direction: From/To UI

§Notes

This is bad API and it should be changed in future. Grid should have explicit list of pairs (row, child) instead of this indirect attachment.

§

Column(usize)

A request to set column number of a grid to which widget should belong to.

Direction: From/To UI

§Notes

This is bad API and it should be changed in future. Grid should have explicit list of pairs (column, child) instead of this indirect attachment.

§

Margin(Thickness)

A request to set new margin of widget. Margin could be used to add some free space around widget to make UI look less dense.

Direction: From/To UI

§

HitTestVisibility(bool)

A request to set new state hit test visibility. If set to false, widget will become “non-clickable”. It is useful for decorations which should be transparent for mouse events.

Direction: From/To UI

§

Visibility(bool)

A request to set new visibility of a widget. Widget can be either visible or not. Invisible widgets does not take space in layout pass and collapsed to a point.

Direction: From/To UI

§

ZIndex(usize)

A request to set new z index of a widget. Z index is used to change drawing order of widgets. Please note that it works only in same hierarchy level, which means that it is impossible to set z index to 9999 (or similar huge value) to force widget to be drawn on top of everything.

Direction: From/To UI

§

DesiredPosition(Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>)

A request to set new desired position of a widget. It is called “desired” because layout system may ignore it and set some other position. Desired position works with a combination of a layout panel that supports direct coordinated (Canvas for example).

Direction: From/To UI

§

Align

Aligns the widget in the specified widget’s bounds using the given options. It can be used only if the widget is a child of a container, that supports arbitrary positions (such as Canvas).

Fields

§relative_to: Handle<UiNode>

A handle of a node to which the sender of this message should be aligned to.

§horizontal_alignment: HorizontalAlignment

Horizontal alignment of the widget.

§vertical_alignment: VerticalAlignment

Vertical alignment of the widget.

§margin: Thickness

Margins for each side.

§

Enabled(bool)

A request to enable or disable widget. Disabled widget won’t receive mouse events and may look differently (it is defined by internal styling).

Direction: From/To UI

§

Center

A request to set desired position at center in local coordinates.

Direction: From/To UI

§

AdjustPositionToFit

A request to adjust widget’s position to fit in parent’s bounds.

§

Cursor(Option<CursorIcon>)

A request to set new cursor icon for widget.

Direction: From/To UI

§

Opacity(Option<f32>)

A request to set new opacity for widget.

Direction: From/To UI

§

LayoutTransform(Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>)

A request to set new layout transform.

§

RenderTransform(Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>)

A request to set new render transform.

§

DoubleClick

A double click of a mouse button has occurred on a widget.

Fields

§button: MouseButton

A button, that was double-clicked.

§

ContextMenu(Option<RcUiNodeHandle>)

A request to set new context menu for a widget. Old context menu will be removed only if its reference counter was 1.

§

Tooltip(Option<RcUiNodeHandle>)

A request to set new tooltip for a widget. Old tooltip will be removed only if its reference counter was 1.

§

TouchStarted

Initiated when user places finger on the screen.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

position of user’s finger

§force: Option<Force>

pressure exerted on screen at pos

§id: u64

unique identifier for touch event

§

TouchEnded

Initiated when user removes finger from the screen.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

position of user’s finger

§id: u64

unique identifier for touch event

§

TouchMoved

Initiated when user drags their finger across the screen.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

position of user’s finger

§force: Option<Force>

pressure exerted on screen at pos

§id: u64

unique identifier for touch event

§

TouchCancelled

Initiated when user cancels their touch event.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

position of user’s finger

§id: u64

unique identifier for touch event

§

DoubleTap

Initiated when user taps the screen two or more times in rapid succession.

Direction: From UI.

Fields

§pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>

position of user’s finger

§force: Option<Force>

pressure exerted on screen at pos

§id: u64

unique identifier for touch event

§

SortChildren(SortingPredicate)

Sorts children widgets of a widget.

Direction: To UI.

§

Style(Resource<Style>)

Applies a style to the widget.

Implementations§

Source§

impl WidgetMessage

Source

pub fn remove( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Remove message.

Creates WidgetMessage::Unlink message.

Creates WidgetMessage::LinkWith message.

Source

pub fn replace_children( destination: Handle<UiNode>, direction: MessageDirection, value: Vec<Handle<UiNode>>, ) -> UiMessage

Source

pub fn background( destination: Handle<UiNode>, direction: MessageDirection, value: StyledProperty<Brush>, ) -> UiMessage

Creates WidgetMessage::Background message.

Source

pub fn foreground( destination: Handle<UiNode>, direction: MessageDirection, value: StyledProperty<Brush>, ) -> UiMessage

Creates WidgetMessage::Foreground message.

Source

pub fn visibility( destination: Handle<UiNode>, direction: MessageDirection, value: bool, ) -> UiMessage

Creates WidgetMessage::Visibility message.

Source

pub fn width( destination: Handle<UiNode>, direction: MessageDirection, value: f32, ) -> UiMessage

Creates WidgetMessage::Width message.

Source

pub fn height( destination: Handle<UiNode>, direction: MessageDirection, value: f32, ) -> UiMessage

Creates WidgetMessage::Height message.

Source

pub fn desired_position( destination: Handle<UiNode>, direction: MessageDirection, value: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> UiMessage

Source

pub fn center( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Center message.

Source

pub fn adjust_position_to_fit( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Source

pub fn align( destination: Handle<UiNode>, direction: MessageDirection, relative_to: Handle<UiNode>, horizontal_alignment: HorizontalAlignment, vertical_alignment: VerticalAlignment, margin: Thickness, ) -> UiMessage

Creates WidgetMessage::Align message.

Source

pub fn topmost( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Topmost message.

Source

pub fn lowermost( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Lowermost message.

Source

pub fn enabled( destination: Handle<UiNode>, direction: MessageDirection, value: bool, ) -> UiMessage

Creates WidgetMessage::Enabled message.

Source

pub fn name( destination: Handle<UiNode>, direction: MessageDirection, value: String, ) -> UiMessage

Creates WidgetMessage::Name message.

Source

pub fn row( destination: Handle<UiNode>, direction: MessageDirection, value: usize, ) -> UiMessage

Creates WidgetMessage::Row message.

Source

pub fn column( destination: Handle<UiNode>, direction: MessageDirection, value: usize, ) -> UiMessage

Creates WidgetMessage::Column message.

Source

pub fn cursor( destination: Handle<UiNode>, direction: MessageDirection, value: Option<CursorIcon>, ) -> UiMessage

Creates WidgetMessage::Cursor message.

Source

pub fn z_index( destination: Handle<UiNode>, direction: MessageDirection, value: usize, ) -> UiMessage

Creates WidgetMessage::ZIndex message.

Source

pub fn hit_test_visibility( destination: Handle<UiNode>, direction: MessageDirection, value: bool, ) -> UiMessage

Source

pub fn margin( destination: Handle<UiNode>, direction: MessageDirection, value: Thickness, ) -> UiMessage

Creates WidgetMessage::Margin message.

Source

pub fn min_size( destination: Handle<UiNode>, direction: MessageDirection, value: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> UiMessage

Creates WidgetMessage::MinSize message.

Source

pub fn max_size( destination: Handle<UiNode>, direction: MessageDirection, value: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> UiMessage

Creates WidgetMessage::MaxSize message.

Source

pub fn horizontal_alignment( destination: Handle<UiNode>, direction: MessageDirection, value: HorizontalAlignment, ) -> UiMessage

Source

pub fn vertical_alignment( destination: Handle<UiNode>, direction: MessageDirection, value: VerticalAlignment, ) -> UiMessage

Source

pub fn opacity( destination: Handle<UiNode>, direction: MessageDirection, value: Option<f32>, ) -> UiMessage

Creates WidgetMessage::Opacity message.

Source

pub fn layout_transform( destination: Handle<UiNode>, direction: MessageDirection, value: Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>, ) -> UiMessage

Source

pub fn render_transform( destination: Handle<UiNode>, direction: MessageDirection, value: Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>, ) -> UiMessage

Source

pub fn context_menu( destination: Handle<UiNode>, direction: MessageDirection, value: Option<RcUiNodeHandle>, ) -> UiMessage

Creates WidgetMessage::ContextMenu message.

Source

pub fn tooltip( destination: Handle<UiNode>, direction: MessageDirection, value: Option<RcUiNodeHandle>, ) -> UiMessage

Creates WidgetMessage::Tooltip message.

Source

pub fn focus( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Focus message.

Source

pub fn unfocus( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::Unfocus message.

Source

pub fn mouse_down( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, button: MouseButton, ) -> UiMessage

Creates WidgetMessage::MouseDown message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn mouse_up( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, button: MouseButton, ) -> UiMessage

Creates WidgetMessage::MouseUp message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn mouse_move( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, state: MouseState, ) -> UiMessage

Creates WidgetMessage::MouseMove message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn mouse_wheel( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, amount: f32, ) -> UiMessage

Creates WidgetMessage::MouseWheel message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn mouse_leave( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::MouseLeave message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn mouse_enter( destination: Handle<UiNode>, direction: MessageDirection, ) -> UiMessage

Creates WidgetMessage::MouseEnter message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn text( destination: Handle<UiNode>, direction: MessageDirection, value: String, ) -> UiMessage

Creates WidgetMessage::Text message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn key_down( destination: Handle<UiNode>, direction: MessageDirection, value: KeyCode, ) -> UiMessage

Creates WidgetMessage::KeyDown message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn key_up( destination: Handle<UiNode>, direction: MessageDirection, value: KeyCode, ) -> UiMessage

Creates WidgetMessage::KeyUp message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn drag_started( destination: Handle<UiNode>, direction: MessageDirection, value: Handle<UiNode>, ) -> UiMessage

Creates WidgetMessage::DragStarted message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn drag_over( destination: Handle<UiNode>, direction: MessageDirection, value: Handle<UiNode>, ) -> UiMessage

Creates WidgetMessage::DragOver message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn drop( destination: Handle<UiNode>, direction: MessageDirection, value: Handle<UiNode>, ) -> UiMessage

Creates WidgetMessage::Drop message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn double_click( destination: Handle<UiNode>, direction: MessageDirection, button: MouseButton, ) -> UiMessage

Creates WidgetMessage::DoubleClick message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn touch_started( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, ) -> UiMessage

Creates WidgetMessage::TouchStarted message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn touch_ended( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, id: u64, ) -> UiMessage

Creates WidgetMessage::TouchEnded message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn touch_moved( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, ) -> UiMessage

Creates WidgetMessage::TouchMoved message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn touch_cancelled( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, id: u64, ) -> UiMessage

Creates WidgetMessage::TouchCancelled message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn double_tap( destination: Handle<UiNode>, direction: MessageDirection, pos: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, force: Option<Force>, id: u64, ) -> UiMessage

Creates WidgetMessage::DoubleTap message. This method is for internal use only, and should not be used anywhere else.

Source

pub fn sort_children( destination: Handle<UiNode>, direction: MessageDirection, value: SortingPredicate, ) -> UiMessage

Creates WidgetMessage::SortChildren message.

Source

pub fn style( destination: Handle<UiNode>, direction: MessageDirection, value: Resource<Style>, ) -> UiMessage

Creates WidgetMessage::Style message.

Trait Implementations§

Source§

impl Clone for WidgetMessage

Source§

fn clone(&self) -> WidgetMessage

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WidgetMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for WidgetMessage

Source§

fn eq(&self, other: &WidgetMessage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for WidgetMessage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsyncTaskResult for T
where T: Any + Send + 'static,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts self reference as a reference to Any. Could be used to downcast a trait object to a particular type.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts self reference as a reference to Any. Could be used to downcast a trait object to a particular type.
Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> FieldValue for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self to a &dyn Any
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MessageData for T
where T: 'static + Debug + PartialEq + Any + Send + Clone,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self as Any reference.
Source§

fn compare(&self, other: &(dyn MessageData + 'static)) -> bool

Compares this message data with some other.
Source§

fn clone_box(&self) -> Box<dyn MessageData>

Clones self as boxed value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ScriptMessagePayload for T
where T: 'static + Send + Debug,

Source§

fn as_any_ref(&self) -> &(dyn Any + 'static)

Returns self as &dyn Any
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns self as &dyn Any
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ResourceLoadError for T
where T: 'static + Debug + Send + Sync,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,