Enum wick_config::config::test_case::TestPacketData
source · pub enum TestPacketData {
SuccessPacket(SuccessPayload),
PacketAssertion(PacketAssertionDef),
ErrorPacket(ErrorPayload),
}Expand description
Either a success packet or an error packet.
Variants§
SuccessPacket(SuccessPayload)
A variant representing a SuccessPayload type.
PacketAssertion(PacketAssertionDef)
A variant representing a PacketAssertion type.
ErrorPacket(ErrorPayload)
A variant representing a ErrorPayload type.
Implementations§
source§impl TestPacketData
impl TestPacketData
sourcepub fn success(port: impl Into<String>, data: Option<LiquidJsonValue>) -> Self
pub fn success(port: impl Into<String>, data: Option<LiquidJsonValue>) -> Self
Create a new success packet.
sourcepub fn error(port: impl Into<String>, error: impl Into<String>) -> Self
pub fn error(port: impl Into<String>, error: impl Into<String>) -> Self
Create a new error packet.
sourcepub const fn data(&self) -> Option<&LiquidJsonValue>
pub const fn data(&self) -> Option<&LiquidJsonValue>
Get the data for the packet.
Trait Implementations§
source§impl Clone for TestPacketData
impl Clone for TestPacketData
source§fn clone(&self) -> TestPacketData
fn clone(&self) -> TestPacketData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for TestPacketData
impl Debug for TestPacketData
source§impl PartialEq<TestPacketData> for TestPacketData
impl PartialEq<TestPacketData> for TestPacketData
source§fn eq(&self, other: &TestPacketData) -> bool
fn eq(&self, other: &TestPacketData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for TestPacketData
impl Serialize for TestPacketData
source§impl TryFrom<TestPacketData> for TestPacketData
impl TryFrom<TestPacketData> for TestPacketData
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
source§fn try_from(value: TestPacketData) -> Result<Self, ManifestError>
fn try_from(value: TestPacketData) -> Result<Self, ManifestError>
Performs the conversion.
source§impl TryFrom<TestPacketData> for TestPacketData
impl TryFrom<TestPacketData> for TestPacketData
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
source§fn try_from(value: TestPacketData) -> Result<Self, ManifestError>
fn try_from(value: TestPacketData) -> Result<Self, ManifestError>
Performs the conversion.
impl StructuralPartialEq for TestPacketData
Auto Trait Implementations§
impl RefUnwindSafe for TestPacketData
impl Send for TestPacketData
impl Sync for TestPacketData
impl Unpin for TestPacketData
impl UnwindSafe for TestPacketData
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