#[repr(C)]pub struct Entry<F> {
pointer_low: u16,
code_segment: SegmentSelector,
options: EntryOptions,
pointer_middle: u16,
phantom: PhantomData<F>,
}
Expand description
An Interrupt Descriptor Table entry.
The generic parameter can either be HandlerFunc
or HandlerFuncWithErrCode
, depending
on the interrupt vector.
Fields§
§pointer_low: u16
§code_segment: SegmentSelector
§options: EntryOptions
§pointer_middle: u16
§phantom: PhantomData<F>
Implementations§
source§impl<F> Entry<F>
impl<F> Entry<F>
sourcepub const fn missing() -> Self
pub const fn missing() -> Self
Creates a non-present IDT entry (but sets the must-be-one bits).
sourcefn set_handler_addr(&mut self, addr: u32) -> &mut EntryOptions
fn set_handler_addr(&mut self, addr: u32) -> &mut EntryOptions
Set the handler address for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack),
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack), ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32),
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32), ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError)>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError)>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError),
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: PageFaultError), ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !,
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack) -> !, ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
source§impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !>
impl Entry<unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !>
sourcepub fn set_handler_fn(
&mut self,
handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !,
) -> &mut EntryOptions
pub fn set_handler_fn( &mut self, handler: unsafe extern "x86-interrupt" fn(_: InterruptStack, error_code: u32) -> !, ) -> &mut EntryOptions
Set the handler function for the IDT entry and sets the present bit.
For the code selector field, this function uses the code segment selector currently active in the CPU.
The function returns a mutable reference to the entry’s options that allows further customization.
Trait Implementations§
impl<F: Copy> Copy for Entry<F>
impl<F> StructuralPartialEq for Entry<F>
Auto Trait Implementations§
impl<F> Freeze for Entry<F>
impl<F> RefUnwindSafe for Entry<F>where
F: RefUnwindSafe,
impl<F> Send for Entry<F>where
F: Send,
impl<F> Sync for Entry<F>where
F: Sync,
impl<F> Unpin for Entry<F>where
F: Unpin,
impl<F> UnwindSafe for Entry<F>where
F: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)