pub enum SignalType {
I64,
F64,
Bool,
Str,
Color,
Vec2,
Array {
fields: HashMap<String, SignalType>,
},
Object {
fields: HashMap<String, SignalType>,
},
}Expand description
Declared signal type for a SignalsCfg entry.
The scalar variants (I64, F64, Bool, Str, Color, Vec2)
mirror the four PropertyValue variants Lumen’s PropertyStore models
natively plus string for unrestricted strings. Object and
Array carry their own field schemas so nested map/array signals
can be typed at the leaf.
Variants§
I64
signal_set_int target - PropertyValue::I64.
F64
signal_set_float target - PropertyValue::F64.
Bool
signal_set_bool target - PropertyValue::Bool.
Str
signal_set target - PropertyValue::Str. signal_set has no
dedicated signal_set_string variant; it is already the typed
sink for a string-declared signal.
Color
signal_set_color target - #rrggbb / #rrggbbaa.
Vec2
vec2(x, y) typed signal.
Array
Array of typed records.
Fields
fields: HashMap<String, SignalType>Per-field types of each array element record.
Object
Inline object / map record.
Fields
fields: HashMap<String, SignalType>Per-field types of the record.
Trait Implementations§
Source§impl Clone for SignalType
impl Clone for SignalType
Source§fn clone(&self) -> SignalType
fn clone(&self) -> SignalType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignalType
impl Debug for SignalType
Source§impl PartialEq for SignalType
impl PartialEq for SignalType
Source§fn eq(&self, other: &SignalType) -> bool
fn eq(&self, other: &SignalType) -> bool
self and other values to be equal, and is used by ==.Source§impl TryFrom<&Value> for SignalType
Parse a toml::Value into a SignalType. Accepts:
impl TryFrom<&Value> for SignalType
Parse a toml::Value into a SignalType. Accepts:
- bare strings -> scalar variant
- inline tables with
type = "array"+fields = { ... }->Array - inline tables with
type = "object"+fields = { ... }->Object - inline tables without a
typekey ->Object(treat the whole table as the field map).
Source§impl TryFrom<&str> for SignalType
Bare-string "i64" / "f64" / "bool" / "string" / "color" /
"vec2" decoder for SignalType.
impl TryFrom<&str> for SignalType
Bare-string "i64" / "f64" / "bool" / "string" / "color" /
"vec2" decoder for SignalType.
impl StructuralPartialEq for SignalType
Auto Trait Implementations§
impl Freeze for SignalType
impl RefUnwindSafe for SignalType
impl Send for SignalType
impl Sync for SignalType
impl Unpin for SignalType
impl UnsafeUnpin for SignalType
impl UnwindSafe for SignalType
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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