pub struct TorchOpEvent { /* private fields */ }
Expand description
A pytorch operation
Implementations§
Trait Implementations§
Source§impl Debug for TorchOpEvent
impl Debug for TorchOpEvent
Source§impl Event for TorchOpEvent
impl Event for TorchOpEvent
Source§fn handle<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This is the method that will be called when the simulator fires the event
at a particular time instant. Examples:
For messages, it will be delivering the message to the dst’s receiver queue.
For a proc spawn, it will be creating the proc object and instantiating it.
For any event that manipulates the network (like adding/removing nodes etc.)
implement handle_network().
Source§fn handle_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_simnet: &'life1 SimNet,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_simnet: &'life1 SimNet,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This is the method that will be called when the simulator fires the event
Unless you need to make changes to the network, you do not have to implement this.
Only implement handle() method for all non-simnet requirements.
Auto Trait Implementations§
impl Freeze for TorchOpEvent
impl !RefUnwindSafe for TorchOpEvent
impl Send for TorchOpEvent
impl Sync for TorchOpEvent
impl Unpin for TorchOpEvent
impl !UnwindSafe for TorchOpEvent
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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