Struct dynlink::compartment::Compartment
source · #[repr(C)]pub struct Compartment {
pub name: String,
pub id: CompartmentId,
/* private fields */
}
Expand description
A compartment that contains libraries (and a local runtime).
Fields§
§name: String
§id: CompartmentId
Implementations§
source§impl Compartment
impl Compartment
sourcepub fn advance_tls_generation(&mut self) -> u64
pub fn advance_tls_generation(&mut self) -> u64
Advance the TLS generation count by 1.
sourcepub fn build_tls_region<T>(
&mut self,
tcb: T,
alloc: impl FnOnce(Layout) -> Option<NonNull<u8>>
) -> Result<TlsRegion, DynlinkError>
pub fn build_tls_region<T>( &mut self, tcb: T, alloc: impl FnOnce(Layout) -> Option<NonNull<u8>> ) -> Result<TlsRegion, DynlinkError>
Build a useable TLS region, complete with copied templates, a control block, and a dtv.
source§impl Compartment
impl Compartment
sourcepub fn library_ids(&self) -> impl Iterator<Item = LibraryId> + '_
pub fn library_ids(&self) -> impl Iterator<Item = LibraryId> + '_
Get an iterator over the IDs of libraries in this compartment.
Trait Implementations§
source§impl Debug for Compartment
impl Debug for Compartment
Auto Trait Implementations§
impl !Crossing for Compartment
impl !ObjSafe for Compartment
impl RefUnwindSafe for Compartment
impl Send for Compartment
impl !Sync for Compartment
impl Unpin for Compartment
impl UnwindSafe for Compartment
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