pub fn read_sent_events_count(account: &Value) -> u64 {
        match account {
            Value::Struct(fields) => {
                let sent_events_count = fields
                    .get(4)
                    .expect("sent_events must be field 3 in Account");
                match &*sent_events_count.peek() {
                    Value::Struct(fields) => {
                        match &*fields
                            .get(0)
                            .expect("sent_events_count must be field 0 in Event Handle")
                            .peek()
                        {
                            Value::U64(count) => *count,
                            _ => panic!("Expected a count"),
                        }
                    }
                    _ => panic!("sent event field must exist"),
                }
            }
            _ => panic!("Account must be a Value::Struct"),
        }
    }
/// Returns the sent events count read from a [`Value`] representing the account.
Returns the sent events count read from a [`Value`] representing the account.
Returns the sent events count read from a [ ` Value ` ] representing the account .
pub fn read_sent_events_count(account: &Value) -> u64 {
        match account {
            Value::Struct(fields) => {
                let sent_events_count = fields
                    .get(4)
                    .expect("sent_events must be field 3 in Account");
                match &*sent_events_count.peek() {
                    Value::Struct(fields) => {
                        match &*fields
                            .get(0)
                            .expect("sent_events_count must be field 0 in Event Handle")
                            .peek()
                        {
                            Value::U64(count) => *count,
                            _ => panic!("Expected a count"),
                        }
                    }
                    _ => panic!("sent event field must exist"),
                }
            }
            _ => panic!("Account must be a Value::Struct"),
        }
    }
pub fn read_sent_events_count ( account : & Value ) -> u64 { match account { Value :: Struct ( fields ) => { let sent_events_count = fields . get ( 4 ) . expect ( " " ) ; match & * sent_events_count . peek ( ) { Value :: Struct ( fields ) => { match & * fields . get ( 0 ) . expect ( " " ) . peek ( ) { Value :: U64 ( count ) => * count , _ => panic ! ( " " ) , } } _ => panic ! ( " " ) , } } _ => panic ! ( " " ) , } }
Returns the sent events count read from a [`Value`] representing the account.
Returns the sent events count read from a [ ` Value ` ] representing the account .
account
&Value
account
&Value