/// Determine if a struct of the given signature is at the top of the stack
Determine if a struct of the given signature is at the top of the stack
Determine if a struct of the given signature is at the top of the stack
pub fn stack_has_struct(state: &AbstractState, struct_index: StructDefinitionIndex) -> bool {
    if state.stack_len() > 0 {
        let struct_def = state.module.struct_def_at(struct_index);
        if let Some(struct_value) = state.stack_peek(0) {
            match struct_value.token {
                SignatureToken::Struct(struct_handle, _) => {
                    return struct_handle == struct_def.struct_handle;
                }
                _ => return false,
            }
        }
    }
    false
}
pub fn stack_has_struct ( state : & AbstractState , struct_index : StructDefinitionIndex ) -> bool { if state . stack_len ( ) > 0 { let struct_def = state . module . struct_def_at ( struct_index ) ; if let Some ( struct_value ) = state . stack_peek ( 0 ) { match struct_value . token { SignatureToken :: Struct ( struct_handle , _ ) => { return struct_handle == struct_def . struct_handle ; } _ => return false , } } } false }
Determine if a struct of the given signature is at the top of the stack
Determine if a struct of the given signature is at the top of the stack
state
&AbstractState
struct_index
StructDefinitionIndex