Struct starlark::values::FrozenHeapRef
source · pub struct FrozenHeapRef(/* private fields */);
Expand description
A reference to a FrozenHeap
that keeps alive all values on the underlying heap.
Note that the Hash
is consistent for a single FrozenHeapRef
, but non-deterministic
across executions and distinct but observably identical FrozenHeapRef
values.
Implementations§
source§impl FrozenHeapRef
impl FrozenHeapRef
sourcepub fn allocated_bytes(&self) -> usize
pub fn allocated_bytes(&self) -> usize
Number of bytes allocated on this heap, not including any memory allocated outside of the starlark heap.
sourcepub fn available_bytes(&self) -> usize
pub fn available_bytes(&self) -> usize
Number of bytes allocated by the heap but not filled. Note that these bytes will never be filled as no further allocations can be made on this heap (it has been sealed).
sourcepub fn allocated_summary(&self) -> HeapSummary
pub fn allocated_summary(&self) -> HeapSummary
Obtain a summary of how much memory is currently allocated by this heap. Doesn’t include the heaps it keeps alive by reference.
Trait Implementations§
source§impl Allocative for FrozenHeapRef
impl Allocative for FrozenHeapRef
source§impl Clone for FrozenHeapRef
impl Clone for FrozenHeapRef
source§fn clone(&self) -> FrozenHeapRef
fn clone(&self) -> FrozenHeapRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FrozenHeapRef
impl Debug for FrozenHeapRef
source§impl Default for FrozenHeapRef
impl Default for FrozenHeapRef
source§fn default() -> FrozenHeapRef
fn default() -> FrozenHeapRef
Returns the “default value” for a type. Read more
source§impl Hash for FrozenHeapRef
impl Hash for FrozenHeapRef
source§impl PartialEq for FrozenHeapRef
impl PartialEq for FrozenHeapRef
source§fn eq(&self, other: &FrozenHeapRef) -> bool
fn eq(&self, other: &FrozenHeapRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FrozenHeapRef
Auto Trait Implementations§
impl !RefUnwindSafe for FrozenHeapRef
impl Send for FrozenHeapRef
impl Sync for FrozenHeapRef
impl Unpin for FrozenHeapRef
impl !UnwindSafe for FrozenHeapRef
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.