Skip to main content

Sample

Trait Sample 

Source
pub trait Sample: Sized {
    // Required method
    fn sample_full() -> Self;

    // Provided methods
    fn sample_minimal() -> Self { ... }
    fn sample_alternates() -> Vec<Self> { ... }
}
Expand description

A canonical value of one type, for the schema set and the round-trip corpus.

Required Methods§

Source

fn sample_full() -> Self

A value carrying every field the type declares.

Provided Methods§

Source

fn sample_minimal() -> Self

A value carrying every optional field absent.

Source

fn sample_alternates() -> Vec<Self>

One value per further arm, for a type whose wire form is a union.

A union’s arms declare fields the other arms do not, so a corpus of one value per type would leave those fields undriven. Every arm a type declares beyond the one sample_full carries belongs here.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Sample for AcknowledgementDisposition

Source§

impl Sample for ActionExecutedPayload

Source§

impl Sample for ActionId

Source§

impl Sample for ActionKind

Source§

impl Sample for ActionRecord

Source§

impl Sample for ActionRejectedPayload

Source§

impl Sample for ActionRequest

Source§

impl Sample for ActionRequestedPayload

Source§

impl Sample for Actor

Source§

impl Sample for ActorClass

Source§

impl Sample for Adjustable

Source§

impl Sample for AgentAssessment

Source§

impl Sample for AgentAssessmentPayload

Source§

impl Sample for Confidence

Source§

impl Sample for EffectiveBounds

Source§

impl Sample for EventId

Source§

impl Sample for EventKind

Source§

impl Sample for EventPayload

Source§

impl Sample for EventRecord

Source§

impl Sample for EventSource

Source§

impl Sample for ExecutionOutcome

Source§

impl Sample for FileName

Source§

impl Sample for HeaterSnapshot

Source§

impl Sample for ImageId

Source§

impl Sample for ImageRecord

Source§

impl Sample for ImageRef

Source§

impl Sample for Intervention

Source§

impl Sample for InterventionExpiredPayload

Source§

impl Sample for InterventionId

Source§

impl Sample for InterventionOutcome

Source§

impl Sample for JobManifest

Source§

impl Sample for JobSnapshot

Source§

impl Sample for MalformedExternalEventPayload

Source§

impl Sample for ManifestNarrowing

Source§

impl Sample for ObicoEventType

Source§

impl Sample for ObicoFailureAlert

Source§

impl Sample for ObicoFailureAlertPayload

Source§

impl Sample for ObicoFailureEvent

Source§

impl Sample for ObicoFailureEventType

Source§

impl Sample for ObicoNotificationEvent

Source§

impl Sample for ObicoNotificationType

Source§

impl Sample for ObicoPrintInfo

Source§

impl Sample for ObicoPrinterInfo

Source§

impl Sample for ObicoPrinterNotification

Source§

impl Sample for ObicoPrinterNotificationPayload

Source§

impl Sample for ObicoTimestamp

Source§

impl Sample for OperatorAcknowledgementPayload

Source§

impl Sample for PolicyDecision

Source§

impl Sample for PortFailurePayload

Source§

impl Sample for PortFailureSite

Source§

impl Sample for PrintAction

Source§

impl Sample for PrintContext

Source§

impl Sample for PrintId

Source§

impl Sample for PrintRecord

Source§

impl Sample for PrinterSnapshot

Source§

impl Sample for PrinterState

Source§

impl Sample for Range

Source§

impl Sample for RawBytes

Source§

impl Sample for RejectionReason

Source§

impl Sample for Reported<f64>

Source§

impl Sample for SafetyEnvelope

Source§

impl Sample for SessionPhase

Source§

impl Sample for StartupOutcome

Source§

impl Sample for StartupReconciliationPayload

Source§

impl Sample for SupervisionSession

Source§

impl Sample for SupervisionSessionClosedPayload

Source§

impl Sample for SupervisionSessionOpenedPayload

Source§

impl Sample for Timestamp