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

Returns the base address of the stack. On all modern architectures, the stack grows downwards, so this is the highest address.

Returns the limit address of the stack. On all modern architectures, the stack grows downwards, so this is the lowest address.

Implementors