is_known_event_type

Function is_known_event_type 

Source
pub fn is_known_event_type(event_type: &str) -> bool
Expand description

Checks if an event type string is a known/recognized event type.

This is a convenience function that returns true if the event type can be mapped to an EventType enum variant.

§Arguments

  • event_type - The event type string to check (case-insensitive)

§Returns

true if the event type is recognized, false otherwise.

§Example

use stem_rs::response::events::is_known_event_type;

assert!(is_known_event_type("BW"));
assert!(is_known_event_type("CIRC"));
assert!(is_known_event_type("stream")); // Case-insensitive
assert!(!is_known_event_type("UNKNOWN_EVENT"));