pub enum Segment {
Fs,
Gs,
}Expand description
The storage an address is counted from, on a machine that has more than one.
x86 keeps a thread’s own block of words at a fixed place reached through a segment register,
and that block is the only thing anything here uses one for. The stack protector’s canary lives
in it, which is why %fs:40 is an address a compiler writes and %fs is not a register any
program names. Every other address this compiler writes is in the flat segment and says nothing
at all, which is what None is.
Variants§
Fs
%fs, which is where a thread’s own block is on x86-64 under System V.
Gs
%gs, which is where it is on x86-64 under Windows and inside a kernel.
Trait Implementations§
impl Copy for Segment
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more