Enum wick_config::config::test_case::PacketData
source · pub enum PacketData {
SuccessPacket(SuccessPayload),
ErrorPacket(ErrorPayload),
}Expand description
Either a success packet or an error packet.
Variants§
SuccessPacket(SuccessPayload)
A variant representing a SuccessPayload type.
ErrorPacket(ErrorPayload)
A variant representing a ErrorPayload type.
Implementations§
source§impl PacketData
impl PacketData
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 flag(&self) -> MaybePacketFlag
pub const fn flag(&self) -> MaybePacketFlag
Get the flags for the 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 PacketData
impl Clone for PacketData
source§fn clone(&self) -> PacketData
fn clone(&self) -> PacketData
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 PacketData
impl Debug for PacketData
source§impl PartialEq<PacketData> for PacketData
impl PartialEq<PacketData> for PacketData
source§fn eq(&self, other: &PacketData) -> bool
fn eq(&self, other: &PacketData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for PacketData
impl Serialize for PacketData
source§impl TryFrom<PacketData> for PacketData
impl TryFrom<PacketData> for PacketData
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
source§fn try_from(value: PacketData) -> Result<Self, ManifestError>
fn try_from(value: PacketData) -> Result<Self, ManifestError>
Performs the conversion.
source§impl TryFrom<PacketData> for PacketData
impl TryFrom<PacketData> for PacketData
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
source§fn try_from(value: PacketData) -> Result<Self, ManifestError>
fn try_from(value: PacketData) -> Result<Self, ManifestError>
Performs the conversion.
impl StructuralPartialEq for PacketData
Auto Trait Implementations§
impl RefUnwindSafe for PacketData
impl Send for PacketData
impl Sync for PacketData
impl Unpin for PacketData
impl UnwindSafe for PacketData
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