Next Generation WASM Microkernel Operating System
1// Copyright 2025 Jonas Kruckenberg
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7
8//! Generic trap/exception handling types
9
10#![no_std]
11
12/// Generic trap type that can represent either an interrupt or an exception
13/// The specific Interrupt and Exception types are defined by each architecture
14#[derive(Copy, Clone, Debug, Eq, PartialEq)]
15pub enum Trap<I, E> {
16 Interrupt(I),
17 Exception(E),
18}