Struct mmtk::vm::slot::SimpleSlot
source · #[repr(transparent)]pub struct SimpleSlot {
slot_addr: *mut Atomic<Address>,
}
Expand description
A simple slot implementation that represents a word-sized slot which holds the raw address of
an ObjectReference
, or 0 if it is holding a null reference.
It is the default slot type, and should be suitable for most VMs.
Fields§
§slot_addr: *mut Atomic<Address>
Implementations§
source§impl SimpleSlot
impl SimpleSlot
sourcepub fn from_address(address: Address) -> Self
pub fn from_address(address: Address) -> Self
Create a simple slot from an address.
Arguments:
address
: The address in memory where anObjectReference
is stored.
sourcepub fn as_address(&self) -> Address
pub fn as_address(&self) -> Address
Get the address of the slot.
Return the address at which the ObjectReference
is stored.
Trait Implementations§
source§impl Clone for SimpleSlot
impl Clone for SimpleSlot
source§fn clone(&self) -> SimpleSlot
fn clone(&self) -> SimpleSlot
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 SimpleSlot
impl Debug for SimpleSlot
source§impl Hash for SimpleSlot
impl Hash for SimpleSlot
source§impl PartialEq for SimpleSlot
impl PartialEq for SimpleSlot
source§fn eq(&self, other: &SimpleSlot) -> bool
fn eq(&self, other: &SimpleSlot) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Slot for SimpleSlot
impl Slot for SimpleSlot
source§fn store(&self, object: ObjectReference)
fn store(&self, object: ObjectReference)
Store the object reference
object
into the slot. Read moresource§fn prefetch_load(&self)
fn prefetch_load(&self)
Prefetch the slot so that a subsequent
load
will be faster.source§fn prefetch_store(&self)
fn prefetch_store(&self)
Prefetch the slot so that a subsequent
store
will be faster.impl Copy for SimpleSlot
impl Eq for SimpleSlot
impl Send for SimpleSlot
impl StructuralPartialEq for SimpleSlot
Auto Trait Implementations§
impl !RefUnwindSafe for SimpleSlot
impl !Sync for SimpleSlot
impl Unpin for SimpleSlot
impl !UnwindSafe for SimpleSlot
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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