Trait fringe::Stack
[−]
[src]
pub trait Stack { fn base(&self) -> *mut u8; fn limit(&self) -> *mut u8; }
A trait for objects that hold ownership of a stack.
To preserve memory safety, an implementation of this trait must fulfill the following contract:
- The base address of the stack must be aligned to
a
STACK_ALIGNMENT
-byte boundary. - Every address between the base and the limit must be readable and writable.
Required Methods
fn base(&self) -> *mut u8
Returns the base address of the stack. On all modern architectures, the stack grows downwards, so this is the highest address.
fn limit(&self) -> *mut u8
Returns the limit address of the stack. On all modern architectures, the stack grows downwards, so this is the lowest address.
Implementors
impl<'a> Stack for SliceStack<'a>
impl Stack for OwnedStack
impl Stack for Stack