mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
xous: definitions: add Display to MemoryType
Useful in debugging and error messages. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
506bd381b2
commit
5a0533d6bc
1 changed files with 11 additions and 0 deletions
|
|
@ -491,6 +491,17 @@ impl From<usize> for MemoryType {
|
|||
}
|
||||
}
|
||||
|
||||
impl core::fmt::Display for MemoryType {
|
||||
fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
match *self {
|
||||
MemoryType::Default => write!(fmt, "Default"),
|
||||
MemoryType::Heap => write!(fmt, "Heap"),
|
||||
MemoryType::Stack => write!(fmt, "Stack"),
|
||||
MemoryType::Messages => write!(fmt, "Messages"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Result {
|
||||
|
|
|
|||
Loading…
Reference in a new issue