Skip to main content

PacketObserver

Struct PacketObserver 

Source
pub struct PacketObserver { /* private fields */ }
Expand description

PacketObserver gets the latest packet.

Implementations§

Source§

impl PacketObserver

Source

pub fn new<S>(name: S) -> Self
where S: Into<Cow<'static, str>>,

Create a new PacketObserver

Source

pub fn clear(&mut self)

Clear status by Executor

Source

pub fn set_packet(&mut self, packet: Vec<u8>)

Set packet by Executor

Source

pub fn last_packet(&self) -> Option<&Vec<u8>>

Get last packet

Trait Implementations§

Source§

impl Debug for PacketObserver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PacketObserver

Source§

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 Named for PacketObserver

Source§

fn name(&self) -> &Cow<'static, str>

Provide the name of this element.
Source§

impl<I, S> Observer<I, S> for PacketObserver

Source§

fn post_exec( &mut self, _state: &mut S, _input: &I, _exit_kind: &ExitKind, ) -> Result<(), Error>

Called right after execution finishes.
Source§

fn flush(&mut self) -> Result<(), Error>

The testcase finished execution, calculate any changes. Reserved for future use.
Source§

fn pre_exec(&mut self, _state: &mut S, _input: &I) -> Result<(), Error>

Called right before execution starts.
Source§

fn pre_exec_child(&mut self, _state: &mut S, _input: &I) -> Result<(), Error>

Called right before execution starts in the child process, if any.
Source§

fn post_exec_child( &mut self, _state: &mut S, _input: &I, _exit_kind: &ExitKind, ) -> Result<(), Error>

Called right after execution finishes in the child process, if any.
Source§

impl Serialize for PacketObserver

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Head, T> Append<T> for Head

Source§

fn append(self, value: T) -> (Head, T)

Append Value and return the tuple
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<N> Handled for N
where N: Named,

Source§

fn handle(&self) -> Handle<Self>

Return the Handle
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeHasClientPerfMonitor for T

Source§

impl<Tail, T> Prepend<T> for Tail

Source§

fn prepend(self, value: T) -> (T, Tail)

Prepend a value to this tuple, returning a new tuple with prepended value.
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.