pub struct EngineIdentity {
pub worker_id: u64,
}Expand description
Stable identity of one logical mock engine.
Fields§
§worker_id: u64Stable logical worker ID.
Implementations§
Source§impl EngineIdentity
impl EngineIdentity
Sourcepub const fn new(worker_id: u64) -> Self
pub const fn new(worker_id: u64) -> Self
Construct an engine identity from its stable worker ID.
Sourcepub const fn rank(self, dp_rank: u32, dp_size: NonZeroU32) -> RankIdentity
pub const fn rank(self, dp_rank: u32, dp_size: NonZeroU32) -> RankIdentity
Return the identity of one attention-DP rank.
Trait Implementations§
Source§impl Clone for EngineIdentity
impl Clone for EngineIdentity
Source§fn clone(&self) -> EngineIdentity
fn clone(&self) -> EngineIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EngineIdentity
Source§impl Debug for EngineIdentity
impl Debug for EngineIdentity
impl Eq for EngineIdentity
Source§impl Hash for EngineIdentity
impl Hash for EngineIdentity
Source§impl PartialEq for EngineIdentity
impl PartialEq for EngineIdentity
impl StructuralPartialEq for EngineIdentity
Auto Trait Implementations§
impl Freeze for EngineIdentity
impl RefUnwindSafe for EngineIdentity
impl Send for EngineIdentity
impl Sync for EngineIdentity
impl Unpin for EngineIdentity
impl UnsafeUnpin for EngineIdentity
impl UnwindSafe for EngineIdentity
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.