pub struct SemaphoreEntity {
pub max_permits: u32,
pub handed_out_permits: u32,
}Fields§
§max_permits: u32Total permits configured for this semaphore.
handed_out_permits: u32Current number of permits acquired and not yet released.
Trait Implementations§
Source§impl EntityBodySlot for SemaphoreEntity
impl EntityBodySlot for SemaphoreEntity
const KIND_NAME: &'static str = "Semaphore"
type Value = SemaphoreEntity
fn project(body: &EntityBody) -> Option<&Self::Value>
fn project_mut(body: &mut EntityBody) -> Option<&mut Self::Value>
Source§impl<'ʄ> Facet<'ʄ> for SemaphoreEntity
impl<'ʄ> Facet<'ʄ> for SemaphoreEntity
Source§impl From<SemaphoreEntity> for EntityBody
impl From<SemaphoreEntity> for EntityBody
Source§fn from(value: SemaphoreEntity) -> Self
fn from(value: SemaphoreEntity) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SemaphoreEntity
impl RefUnwindSafe for SemaphoreEntity
impl Send for SemaphoreEntity
impl Sync for SemaphoreEntity
impl Unpin for SemaphoreEntity
impl UnsafeUnpin for SemaphoreEntity
impl UnwindSafe for SemaphoreEntity
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