Notify

Struct Notify 

Source
pub struct Notify<T> { /* private fields */ }
Expand description

A lightweight wrapper that guarantees an event will be generated every time the inner value is accessed mutably, even if the value doesn’t change.

This is useful for types like a play head where periodically writing the same value carries useful information.

Notify implements core::ops::Deref and core::ops::DerefMut for the inner T.

Implementations§

Source§

impl<T> Notify<T>

Source

pub fn new(value: T) -> Self

Construct a new Notify.

If two instances of Notify are constructed separately, a call to Diff::diff will produce an event, even if the value is the same.

// Diffing `a` and `b` will produce an event
let a = Notify::new(1);
let b = Notify::new(1);

// whereas `b` and `c` will not.
let c = b.clone();
Source

pub fn id(&self) -> u64

Get this instance’s unique ID.

After each mutable dereference, this ID will be replaced with a new, unique value. For all practical purposes, the ID can be considered unique among all Notify instances.

Notify IDs are guaranteed to never be 0, so it can be used as a sentinel value.

Source

pub fn as_mut_unsync(&mut self) -> &mut T

Get mutable access to the inner value without updating the ID.

Source

pub fn notify(&mut self)

Manually update the internal ID without modifying the internals.

Trait Implementations§

Source§

impl<T> AsMut<T> for Notify<T>

Source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsRef<T> for Notify<T>

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Clone> Clone for Notify<T>

Source§

fn clone(&self) -> Notify<T>

Returns a duplicate 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<T: Debug> Debug for Notify<T>

Source§

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

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

impl<T: Default> Default for Notify<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> Deref for Notify<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T> DerefMut for Notify<T>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Diff for Notify<()>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<DurationMusical>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<DurationSamples>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<DurationSeconds>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<InstantMusical>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<InstantSamples>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<InstantSeconds>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl<T: RealtimeClone + Send + Sync + 'static> Diff for Notify<T>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<Vec2>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<Vec2>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<Vec3>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<Vec3>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<Volume>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<bool>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<f32>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<f64>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<i16>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<i32>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<i64>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<i8>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<u16>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<u32>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<u64>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl Diff for Notify<u8>

Source§

fn diff<E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut E, )

Compare self to baseline and generate events to resolve any differences.
Source§

impl From<Notify<()>> for ParamData

Source§

fn from(_value: Notify<()>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<DurationMusical>> for ParamData

Source§

fn from(value: Notify<DurationMusical>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<DurationSamples>> for ParamData

Source§

fn from(value: Notify<DurationSamples>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<DurationSeconds>> for ParamData

Source§

fn from(value: Notify<DurationSeconds>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<EventInstant>> for ParamData

Source§

fn from(value: Notify<EventInstant>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<InstantMusical>> for ParamData

Source§

fn from(value: Notify<InstantMusical>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<InstantSamples>> for ParamData

Source§

fn from(value: Notify<InstantSamples>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<InstantSeconds>> for ParamData

Source§

fn from(value: Notify<InstantSeconds>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<Vec2>> for ParamData

Source§

fn from(value: Notify<Vec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<Vec2>> for ParamData

Source§

fn from(value: Notify<Vec2>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<Vec3>> for ParamData

Source§

fn from(value: Notify<Vec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<Vec3>> for ParamData

Source§

fn from(value: Notify<Vec3>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<Volume>> for ParamData

Source§

fn from(value: Notify<Volume>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<bool>> for ParamData

Source§

fn from(value: Notify<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<f32>> for ParamData

Source§

fn from(value: Notify<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<f64>> for ParamData

Source§

fn from(value: Notify<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<i32>> for ParamData

Source§

fn from(value: Notify<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<i64>> for ParamData

Source§

fn from(value: Notify<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<u32>> for ParamData

Source§

fn from(value: Notify<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<Notify<u64>> for ParamData

Source§

fn from(value: Notify<u64>) -> Self

Converts to this type from the input type.
Source§

impl<T> FromReflect for Notify<T>
where Notify<T>: Any + Send + Sync, T: Default + Clone + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn from_reflect(reflect: &dyn PartialReflect) -> Option<Self>

Constructs a concrete instance of Self from a reflected value.
Source§

fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
Source§

impl<T> GetTypeRegistration for Notify<T>
where Notify<T>: Any + Send + Sync, T: Clone + Default + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
Source§

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
Source§

impl<T: PartialEq> PartialEq for Notify<T>

Source§

fn eq(&self, other: &Self) -> 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<T> PartialReflect for Notify<T>
where Notify<T>: Any + Send + Sync, T: Clone + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
Source§

fn try_apply(&mut self, value: &dyn PartialReflect) -> Result<(), ApplyError>

Tries to apply a reflected value to this value. Read more
Source§

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type. Read more
Source§

fn reflect_ref<'a>(&'a self) -> ReflectRef<'a>

Returns an immutable enumeration of “kinds” of type. Read more
Source§

fn reflect_mut<'a>(&'a mut self) -> ReflectMut<'a>

Returns a mutable enumeration of “kinds” of type. Read more
Source§

fn reflect_owned(self: Box<Self>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
Source§

fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.
Source§

fn try_as_reflect(&self) -> Option<&dyn Reflect>

Attempts to cast this type to a fully-reflected value.
Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>

Attempts to cast this type to a mutable, fully-reflected value.
Source§

fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value. Read more
Source§

fn as_partial_reflect(&self) -> &dyn PartialReflect

Casts this type to a reflected value. Read more
Source§

fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect

Casts this type to a mutable, reflected value. Read more
Source§

fn reflect_partial_eq(&self, value: &dyn PartialReflect) -> Option<bool>

Returns a “partial equality” comparison result. Read more
Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection. Read more
Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Applies a reflected value to this value. Read more
Source§

fn clone_value(&self) -> Box<dyn PartialReflect>

👎Deprecated since 0.16.0: to clone reflected values, prefer using reflect_clone. To convert reflected values to dynamic ones, use to_dynamic.
Clones Self into its dynamic representation. Read more
Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Converts this reflected value into its dynamic representation based on its kind. Read more
Source§

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type). Read more
Source§

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

Debug formatter for the value. Read more
Source§

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
Source§

impl Patch for Notify<()>

Source§

type Patch = Notify<()>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<DurationMusical>

Source§

type Patch = Notify<DurationMusical>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<DurationSamples>

Source§

type Patch = Notify<DurationSamples>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<DurationSeconds>

Source§

type Patch = Notify<DurationSeconds>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<InstantMusical>

Source§

type Patch = Notify<InstantMusical>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<InstantSamples>

Source§

type Patch = Notify<InstantSamples>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<InstantSeconds>

Source§

type Patch = Notify<InstantSeconds>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl<T: RealtimeClone + Send + Sync + 'static> Patch for Notify<T>

Source§

type Patch = Notify<T>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, patch: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<Vec2>

Source§

type Patch = Notify<Vec2>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<Vec2>

Source§

type Patch = Notify<Vec2>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<Vec3>

Source§

type Patch = Notify<Vec3>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<Vec3>

Source§

type Patch = Notify<Vec3>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<Volume>

Source§

type Patch = Notify<Volume>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<bool>

Source§

type Patch = Notify<bool>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<f32>

Source§

type Patch = Notify<f32>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<f64>

Source§

type Patch = Notify<f64>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<i16>

Source§

type Patch = Notify<i16>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<i32>

Source§

type Patch = Notify<i32>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<i64>

Source§

type Patch = Notify<i64>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<i8>

Source§

type Patch = Notify<i8>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<u16>

Source§

type Patch = Notify<u16>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<u32>

Source§

type Patch = Notify<u32>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<u64>

Source§

type Patch = Notify<u64>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl Patch for Notify<u8>

Source§

type Patch = Notify<u8>

A type’s patch. Read more
Source§

fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError>

Construct a patch from a parameter event. Read more
Source§

fn apply(&mut self, value: Self::Patch)

Apply a patch. Read more
Source§

fn patch_event(event: &NodeEventType) -> Option<Self::Patch>

Construct a patch from a node event. Read more
Source§

impl<T> Reflect for Notify<T>
where Notify<T>: Any + Send + Sync, T: Clone + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

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

Returns the value as a Box<dyn Any>. Read more
Source§

fn as_any(&self) -> &dyn Any

Returns the value as a &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Returns the value as a &mut dyn Any. Read more
Source§

fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>

Casts this type to a boxed, fully-reflected value.
Source§

fn as_reflect(&self) -> &dyn Reflect

Casts this type to a fully-reflected value.
Source§

fn as_reflect_mut(&mut self) -> &mut dyn Reflect

Casts this type to a mutable, fully-reflected value.
Source§

fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>>

Performs a type-checked assignment of a reflected value to this value. Read more
Source§

impl<T> Struct for Notify<T>
where Notify<T>: Any + Send + Sync, T: Clone + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field named name as a &dyn PartialReflect.
Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field named name as a &mut dyn PartialReflect.
Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field with index index as a &dyn PartialReflect.
Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field with index index as a &mut dyn PartialReflect.
Source§

fn name_at(&self, index: usize) -> Option<&str>

Returns the name of the field with index index.
Source§

fn field_len(&self) -> usize

Returns the number of fields in the struct.
Source§

fn iter_fields<'a>(&'a self) -> FieldIter<'a>

Returns an iterator over the values of the reflectable fields for this struct.
Source§

fn to_dynamic_struct(&self) -> DynamicStruct

Source§

fn clone_dynamic(&self) -> DynamicStruct

👎Deprecated since 0.16.0: use to_dynamic_struct instead
Clones the struct into a DynamicStruct.
Source§

fn get_represented_struct_info(&self) -> Option<&'static StructInfo>

Will return None if TypeInfo is not available.
Source§

impl TryInto<Notify<()>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<()>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<DurationMusical>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<DurationMusical>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<DurationSamples>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<DurationSamples>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<DurationSeconds>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<DurationSeconds>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<EventInstant>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<EventInstant>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<InstantMusical>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<InstantMusical>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<InstantSamples>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<InstantSamples>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<InstantSeconds>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<InstantSeconds>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<Vec2>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<Vec2>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<Vec2>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<Vec2>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<Vec3>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<Vec3>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<Vec3>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<Vec3>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<Volume>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<Volume>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<bool>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<bool>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<f32>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<f32>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<f64>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<f64>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<i32>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<i32>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<i64>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<i64>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<u32>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<u32>, PatchError>

Performs the conversion.
Source§

impl TryInto<Notify<u64>> for &ParamData

Source§

type Error = PatchError

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

fn try_into(self) -> Result<Notify<u64>, PatchError>

Performs the conversion.
Source§

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

Source§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Source§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Source§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Source§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Source§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
Source§

impl<T> Typed for Notify<T>
where Notify<T>: Any + Send + Sync, T: Clone + FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
Source§

impl<T: Copy> Copy for Notify<T>

Auto Trait Implementations§

§

impl<T> Freeze for Notify<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Notify<T>
where T: RefUnwindSafe,

§

impl<T> Send for Notify<T>
where T: Send,

§

impl<T> Sync for Notify<T>
where T: Sync,

§

impl<T> Unpin for Notify<T>
where T: Unpin,

§

impl<T> UnwindSafe for Notify<T>
where T: UnwindSafe,

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> 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>

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

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

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

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

Converts &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)

Converts &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> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DynamicTypePath for T
where T: TypePath,

Source§

impl<T> DynamicTyped for T
where T: Typed,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromWorld for T
where T: Default,

Source§

fn from_world(_world: &mut World) -> T

Creates Self using default().

Source§

impl<S> GetField for S
where S: Struct,

Source§

fn get_field<T>(&self, name: &str) -> Option<&T>
where T: Reflect,

Returns a reference to the value of the field named name, downcast to T.
Source§

fn get_field_mut<T>(&mut self, name: &str) -> Option<&mut T>
where T: Reflect,

Returns a mutable reference to the value of the field named name, downcast to T.
Source§

impl<T> GetPath for T
where T: Reflect + ?Sized,

Source§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
Source§

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
Source§

fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
Source§

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. 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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

impl<T> ConditionalSend for T
where T: Send,

Source§

impl<T> Reflectable for T