pub struct WorkerStates { /* private fields */ }Expand description
Worker の永続状態コンテナ - GPU的なメモリ配置
Implementations§
Source§impl WorkerStates
impl WorkerStates
pub fn new(count: usize) -> Self
Sourcepub fn get_mut(&mut self, id: AgentId) -> Option<&mut WorkerState>
pub fn get_mut(&mut self, id: AgentId) -> Option<&mut WorkerState>
Worker は自分の State のみ mutable アクセス可能
Sourcepub fn get(&self, id: AgentId) -> Option<&WorkerState>
pub fn get(&self, id: AgentId) -> Option<&WorkerState>
他 Worker の State は ReadOnly
Sourcepub fn iter(&self) -> impl Iterator<Item = &WorkerState>
pub fn iter(&self) -> impl Iterator<Item = &WorkerState>
イテレーション
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut WorkerState>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut WorkerState>
可変イテレーション
Sourcepub fn par_iter_mut(&mut self) -> impl ParallelIterator<Item = &mut WorkerState>
pub fn par_iter_mut(&mut self) -> impl ParallelIterator<Item = &mut WorkerState>
並列イテレーション(Rayon等で並列処理)
Auto Trait Implementations§
impl Freeze for WorkerStates
impl !RefUnwindSafe for WorkerStates
impl Send for WorkerStates
impl Sync for WorkerStates
impl Unpin for WorkerStates
impl !UnwindSafe for WorkerStates
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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