Returns true if this Event is an init event, and false otherwise
(&self)
| 95 | { |
| 96 | /// Returns true if this Event is an init event, and false otherwise |
| 97 | pub fn is_init(&self) -> bool { |
| 98 | match self { |
| 99 | Event::Time(_) => false, |
| 100 | Event::Signed(event) => match event.payload() { |
| 101 | Payload::Data(_) => false, |
| 102 | Payload::Init(_) => true, |
| 103 | }, |
| 104 | Event::Unsigned(_) => true, |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | /// Returns the init payload if the event is an init event, otherwise returns None. |
| 109 | pub fn init_payload(&self) -> Option<&init::Payload<D>> { |
no test coverage detected