pub struct Signal {
pub id: String,
pub symbol: String,
pub kind: SignalType,
pub confidence: f64,
pub timestamp: DateTime<Utc>,
pub source: String,
pub metadata: Value,
}Expand description
A richer signal carrying confidence, source, and arbitrary metadata for logging.
The framework’s execution layer doesn’t interpret metadata — it’s there so
a brain can record its rationale for post-hoc analysis.
Fields§
§id: StringUnique identifier for this signal (typically {brain_name}-{counter}).
symbol: StringSymbol the signal is for, as a free-form string.
kind: SignalTypeBuy / Sell / Hold / Close.
confidence: f64Confidence in [0.0, 1.0]. A brain producing a Buy with confidence
0.2 is saying “I’m barely sure about this” — the risk layer can choose
to size down or reject.
timestamp: DateTime<Utc>Time the brain emitted this signal.
source: StringBrain name that emitted the signal — useful for routing in multi-brain bots.
metadata: ValueFree-form. Use serde_json::json!({...}) to populate.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signal
impl<'de> Deserialize<'de> for Signal
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Signal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Signal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Signal
impl Serialize for Signal
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnsafeUnpin for Signal
impl UnwindSafe for Signal
Blanket Implementations§
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
Mutably borrows from an owned value. Read more