Enum signal_handler::ErrorCode
source · pub enum ErrorCode {
+ErrorCode in signal_handler - Rust Enum signal_handler::ErrorCode
source · pub enum ErrorCode {
PageFaultError {
accessed_address: usize,
pf_error: PageFaultErrorCode,
},
Other(u64),
}
Expand description
Possible error codes that may be provided by the CPU during an exception.
-Variants§
Trait Implementations§
source§impl PartialEq<ErrorCode> for ErrorCode
source§fn eq(&self, other: &ErrorCode) -> bool
This method tests for self
and other
values to be equal, and is used
+Variants§
Trait Implementations§
source§impl PartialEq<ErrorCode> for ErrorCode
source§impl Copy for ErrorCode
source§impl Eq for ErrorCode
source§impl StructuralEq for ErrorCode
source§impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
§impl RefUnwindSafe for ErrorCode
§impl Send for ErrorCode
§impl Sync for ErrorCode
§impl Unpin for ErrorCode
§impl UnwindSafe for ErrorCode
Blanket Implementations§
source§impl Copy for ErrorCode
source§impl Eq for ErrorCode
source§impl StructuralEq for ErrorCode
source§impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
§impl RefUnwindSafe for ErrorCode
§impl Send for ErrorCode
§impl Sync for ErrorCode
§impl Unpin for ErrorCode
§impl UnwindSafe for ErrorCode
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
diff --git a/doc/signal_handler/enum.Signal.html b/doc/signal_handler/enum.Signal.html
index 94bbc4cf74..ccbfc5ac15 100644
--- a/doc/signal_handler/enum.Signal.html
+++ b/doc/signal_handler/enum.Signal.html
@@ -1,4 +1,4 @@
-Signal in signal_handler - Rust Enum signal_handler::Signal
source · #[repr(u8)]
+Signal in signal_handler - Rust Enum signal_handler::Signal
source · #[repr(u8)]
pub enum Signal {
InvalidAddress,
IllegalInstruction,
diff --git a/doc/signal_handler/index.html b/doc/signal_handler/index.html
index 2ee2a13df7..8f7183851f 100644
--- a/doc/signal_handler/index.html
+++ b/doc/signal_handler/index.html
@@ -1,4 +1,4 @@
-signal_handler - Rust Crate signal_handler
source · Expand description
Signal handlers for CPU exceptions/errors, like POSIX-style signals, but safer and Rusty.
+signal_handler - Rust Crate signal_handler
source · Expand description
Signal handlers for CPU exceptions/errors, like POSIX-style signals, but safer and Rusty.
Instead of directly supporting POSIX signals like SIGSEGV, SIGILL, etc,
this crate only supports a few categories of signals that represent a CPU/machine exception,
e.g., divide errors, page faults, illegal instructions, etc.
diff --git a/doc/signal_handler/struct.SignalContext.html b/doc/signal_handler/struct.SignalContext.html
index d0502779b9..ef3892f805 100644
--- a/doc/signal_handler/struct.SignalContext.html
+++ b/doc/signal_handler/struct.SignalContext.html
@@ -1,13 +1,13 @@
-SignalContext in signal_handler - Rust Struct signal_handler::SignalContext
source · pub struct SignalContext {
+SignalContext in signal_handler - Rust Struct signal_handler::SignalContext
source · pub struct SignalContext {
pub instruction_pointer: VirtualAddress,
pub stack_pointer: VirtualAddress,
pub signal: Signal,
pub error_code: Option<ErrorCode>,
}
Expand description
Information that is passed to a registered SignalHandler
about an exception that occurred during execution.
-Fields§
§instruction_pointer: VirtualAddress
§stack_pointer: VirtualAddress
§signal: Signal
§error_code: Option<ErrorCode>
Trait Implementations§
source§impl Clone for SignalContext
source§fn clone(&self) -> SignalContext
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for SignalContext
source§impl PartialEq<SignalContext> for SignalContext
source§fn eq(&self, other: &SignalContext) -> bool
This method tests for self
and other
values to be equal, and is used
+Fields§
§instruction_pointer: VirtualAddress
§stack_pointer: VirtualAddress
§signal: Signal
§error_code: Option<ErrorCode>
Trait Implementations§
source§impl Clone for SignalContext
source§fn clone(&self) -> SignalContext
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read moresource§impl Debug for SignalContext
source§impl PartialEq<SignalContext> for SignalContext
source§fn eq(&self, other: &SignalContext) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
.source§impl Copy for SignalContext
source§impl Eq for SignalContext
source§impl StructuralEq for SignalContext
source§impl StructuralPartialEq for SignalContext
Auto Trait Implementations§
§impl RefUnwindSafe for SignalContext
§impl Send for SignalContext
§impl Sync for SignalContext
§impl Unpin for SignalContext
§impl UnwindSafe for SignalContext
Blanket Implementations§
source§impl Copy for SignalContext
source§impl Eq for SignalContext
source§impl StructuralEq for SignalContext
source§impl StructuralPartialEq for SignalContext
Auto Trait Implementations§
§impl RefUnwindSafe for SignalContext
§impl Send for SignalContext
§impl Sync for SignalContext
§impl Unpin for SignalContext
§impl UnwindSafe for SignalContext
Blanket Implementations§
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
diff --git a/doc/src/signal_handler/lib.rs.html b/doc/src/signal_handler/lib.rs.html
index f8ac9e6cf0..2bdaa291ed 100644
--- a/doc/src/signal_handler/lib.rs.html
+++ b/doc/src/signal_handler/lib.rs.html
@@ -169,9 +169,6 @@
169
170
171
-172
-173
-174
//! Signal handlers for CPU exceptions/errors, like POSIX-style signals, but safer and Rusty.
//!
//! Instead of directly supporting POSIX signals like SIGSEGV, SIGILL, etc,
@@ -189,7 +186,7 @@
//! [context]: SignalContext
#![no_std]
-#![feature(trait_alias)]
+#![feature(trait_alias, variant_count)]
extern crate alloc;
@@ -273,11 +270,8 @@
/// Bad arithmetic operation, e.g., divide by zero.
/// Analogous to SIGFPE.
ArithmeticError = 3,
- //
- // Note: if other signals are added, update `NUM_SIGNALS` below.
- //
-}
-const NUM_SIGNALS: usize = 4;
+}
+const NUM_SIGNALS: usize = core::mem::variant_count::<Signal>();
/// Information that is passed to a registered [`SignalHandler`]
diff --git a/doc/window_inner/struct.WindowInner.html b/doc/window_inner/struct.WindowInner.html
index a0b6dc9729..40a6a59e8d 100644
--- a/doc/window_inner/struct.WindowInner.html
+++ b/doc/window_inner/struct.WindowInner.html
@@ -22,7 +22,7 @@
By default, there is one title bar at the top edge of the window.
§moving: WindowMovingStatus
Whether a window is moving or stationary.
TODO: FIXME (kevinaboos): this should be private, and window moving logic should be moved into this crate.
-Implementations§
source§impl WindowInner
sourcepub fn new(
coordinate: Coord,
framebuffer: Framebuffer<AlphaPixel>,
event_producer: Queue<Event>
) -> WindowInner
Creates a new WindowInner
object backed by the given framebuffer
+
Implementations§
source§impl WindowInner
sourcepub fn new(
coordinate: Coord,
framebuffer: Framebuffer<AlphaPixel>,
event_producer: Queue<Event>
) -> WindowInner
Creates a new WindowInner
object backed by the given framebuffer
and that will be rendered at the given coordinate
relative to the screen.
sourcepub fn contains(&self, coordinate: Coord) -> bool
Returns true
if the given coordinate
(relative to the top-left corner of this window)
is within the bounds of this window.
@@ -41,7 +41,7 @@
i.e., the area within the window excluding the title bar and border.
The returned Rectangle
is expressed relative to this Window’s position.
sourcepub fn resize(&mut self, new_position: Rectangle) -> Result<(), &'static str>
Resizes and moves this window to fit the given Rectangle
that describes its new position.
-sourcepub fn send_event(&self, event: Event) -> Result<(), Event>
Sends the given event
to this window.
+sourcepub fn send_event(&self, event: Event) -> Result<(), Event>
Sends the given event
to this window.
If the event queue was full, Err(event)
is returned.
Auto Trait Implementations§
§impl !RefUnwindSafe for WindowInner
§impl Send for WindowInner
§impl Sync for WindowInner
§impl Unpin for WindowInner
§impl !UnwindSafe for WindowInner
Blanket Implementations§