[−][src]Enum dqcsim::common::protocol::SimulatorToPlugin
Simulator/host to plugin requests.
Variants
Initialize(Box<PluginInitializeRequest>)
Request to initialize the plugin.
This is always the first message sent by DQCsim. In response, the plugin must:
- initialize its logging facilities (note that the tee files provided by the copy of the plugin configuration are to be handled by the plugin);
- verify with the user code that the plugin implementation is of the expected type (frontend, operator, or backend);
- connect to the downstream plugin if the plugin is not a backend;
- initialize an IPC endpoint for the upstream plugin to connect to if the plugin is not a frontend;
- return the aforementioned URI to the simulator through a
PluginToSimulator::Initialized
message.
The valid responses to this message are:
- success:
PluginToSimulator::Initialized
- failure:
PluginToSimulator::Failure
AcceptUpstream
Request to complete the connection with the upstream plugin.
This is always the second message sent by DQCsim for operators and backends. It is called after the upstream plugin has been successfully initialized. In response, the plugin must wait for the upstream plugin to connect and finish setting up the connection.
The valid responses to this message are:
- success:
PluginToSimulator::Success
- failure:
PluginToSimulator::Failure
UserInitialize(PluginUserInitializeRequest)
Request to run user initialization code.
This is always the second (frontend) or third (operator, backend) message sent by DQCsim.
The valid responses to this message are:
- success:
PluginToSimulator::Success
- failure:
PluginToSimulator::Failure
Abort
Request to abort the simulation and stop the plugin.
The valid responses to this message are:
- success:
PluginToSimulator::Success
- failure:
PluginToSimulator::Failure
RunRequest(FrontendRunRequest)
Passes control from the host to the frontend plugin.
This is only to be sent to frontends. In response, the frontend must:
- queue up any enclosed messages for reception through the plugin's
recv()
function; - if start is specified, call the user's implementation of the
run()
callback (if this message was received while already executingrun()
, return an error instead); - if the user's implementation of
run()
terminates, put its return value in theresult
field of the response; - if the user's implementation of
run()
queued up messages throughsend()
, put them into themessages
field of the response; - send the
PluginToSimulator::RunResponse
message in response.
The valid responses to this message are:
- success:
PluginToSimulator::RunResponse
- failure:
PluginToSimulator::Failure
ArbRequest(ArbCmd)
Requests execution of the given ArbCmd
by the plugin.
The valid responses to this message are:
- success:
PluginToSimulator::ArbResponse
- failure:
PluginToSimulator::Failure
Trait Implementations
impl PartialEq<SimulatorToPlugin> for SimulatorToPlugin
[src]
fn eq(&self, other: &SimulatorToPlugin) -> bool
[src]
fn ne(&self, other: &SimulatorToPlugin) -> bool
[src]
impl Into<SimulatorToPlugin> for ArbCmd
[src]
fn into(self) -> SimulatorToPlugin
[src]
impl Into<SimulatorToPlugin> for PluginInitializeRequest
[src]
fn into(self) -> SimulatorToPlugin
[src]
impl Into<SimulatorToPlugin> for PluginAcceptUpstreamRequest
[src]
fn into(self) -> SimulatorToPlugin
[src]
impl Into<SimulatorToPlugin> for PluginUserInitializeRequest
[src]
fn into(self) -> SimulatorToPlugin
[src]
impl Into<SimulatorToPlugin> for FrontendRunRequest
[src]
fn into(self) -> SimulatorToPlugin
[src]
impl Debug for SimulatorToPlugin
[src]
impl Serialize for SimulatorToPlugin
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for SimulatorToPlugin
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for SimulatorToPlugin
impl Unpin for SimulatorToPlugin
impl !Sync for SimulatorToPlugin
impl UnwindSafe for SimulatorToPlugin
impl !RefUnwindSafe for SimulatorToPlugin
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,