pub struct Stack { /* private fields */ }
Expand description
Represents any kind of stack memory.
FixedSizeStack
as well as ProtectedFixedSizeStack
can be used to allocate actual stack space.
Implementations§
Source§impl Stack
impl Stack
Sourcepub fn top(&self) -> *mut c_void
pub fn top(&self) -> *mut c_void
Returns the top of the stack from which on it grows downwards towards bottom().
pub fn is_empty(&self) -> bool
Sourcepub fn default_size() -> usize
pub fn default_size() -> usize
Returns a implementation defined default stack size.
This value can vary greatly between platforms, but is usually only a couple memory pages in size and enough for most use-cases with little recursion. It’s usually a better idea to specifiy an explicit stack size instead.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stack
impl RefUnwindSafe for Stack
impl !Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more