MCPcopy Create free account
hub / github.com/Open-Quant/openquant / validate_non_negative_finite

Function validate_non_negative_finite

crates/openquant/src/streaming_hpc.rs:442–447  ·  view source on GitHub ↗
(name: &'static str, value: f64)

Source from the content-addressed store, hash-verified

440}
441
442fn validate_non_negative_finite(name: &'static str, value: f64) -> Result<(), StreamingHpcError> {
443 if !value.is_finite() || value < 0.0 {
444 return Err(StreamingHpcError::InvalidEvent(name));
445 }
446 Ok(())
447}
448
449fn validate_event(event: StreamEvent) -> Result<(), StreamingHpcError> {
450 if !event.price.is_finite() || event.price <= 0.0 {

Callers 2

updateMethod · 0.85
validate_eventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected