pub struct Entity {
pub id: EntityId,
pub birth: PTime,
pub removed_at: Option<PTime>,
pub backtrace: BacktraceId,
pub name: String,
pub body: EntityBody,
}Expand description
A: future, a lock, a channel end (tx, rx), a connection leg, a socket, etc.
Fields§
§id: EntityIdOpaque entity identifier.
birth: PTimeWhen we first started tracking this entity
removed_at: Option<PTime>When this entity was logically removed (deferred removal). Present means the entity is dead but kept alive for event references.
backtrace: BacktraceIdBacktrace when this edge was created
name: StringHuman-facing name for this entity.
body: EntityBodyMore specific info about the entity (depending on its kind)
Implementations§
Source§impl Entity
impl Entity
Sourcepub fn new(
backtrace: BacktraceId,
name: impl Into<String>,
body: EntityBody,
) -> Entity
pub fn new( backtrace: BacktraceId, name: impl Into<String>, body: EntityBody, ) -> Entity
Create a new entity: ID and birth time are generated automatically.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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