Enum firefly_types::serial::Response
source · pub enum Response {
Cheat(i32),
Fuel(Callback, Fuel),
CPU(CPU),
Memory(Memory),
}Expand description
Messages that the runtime sends to connected clients.
Variants§
Cheat(i32)
The value returned by the cheat callback.
Fuel(Callback, Fuel)
Instructions executed by a callback.
CPU(CPU)
CPU time spent running code vs sleeping.
Memory(Memory)
Linear memory used by the wasm app.
Implementations§
source§impl Response
impl Response
sourcepub fn decode(s: &[u8]) -> Result<Self, Error>
pub fn decode(s: &[u8]) -> Result<Self, Error>
Load request from bytes generated by Response::encode.
§Errors
May return an error if the buffer does not contain valid response.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Response
impl PartialEq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)