Enum rg3d_ui::message::MessageDirection [−][src]
Message direction allows you to distinguish from where message has came from. Often there is a need to find out who created a message to respond properly. Imagine that we have a NumericUpDown input field for a property and we using some data source to feed data into input field. When we change something in the input field by typing, it creates a message with new value. On other hand we often need to put new value in the input field from some code, in this case we again creating a message. But how to understand from which “side” message has came from? Was it filled in by user and we should create a command to change value in the data source, or it was created from syncing code just to pass new value to UI? This problem solved by setting a direction to a message. Also it solves another problem: often we need to respond to a message only if it did some changes. In this case at first we fire a message with ToWidget direction, widget catches it and checks if changes are needed and if so, it “rethrows” message with direction FromWidget. Listeners are “subscribed” to FromWidget messages only and won’t respond to ToWidget messages.
Variants
Used to indicate a request for changes in a widget.
Used to indicate response from widget if anything has actually changed.
Implementations
impl MessageDirection
[src]
Trait Implementations
impl Clone for MessageDirection
[src]
fn clone(&self) -> MessageDirection
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MessageDirection
[src]
impl Debug for MessageDirection
[src]
impl Hash for MessageDirection
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MessageDirection> for MessageDirection
[src]
fn eq(&self, other: &MessageDirection) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<MessageDirection> for MessageDirection
[src]
fn partial_cmp(&self, other: &MessageDirection) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for MessageDirection
[src]
Auto Trait Implementations
impl RefUnwindSafe for MessageDirection
impl Send for MessageDirection
impl Sync for MessageDirection
impl Unpin for MessageDirection
impl UnwindSafe for MessageDirection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]
T: Copy + PartialEq<T> + Debug + Any,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,