ReportField

Trait ReportField 

Source
pub trait ReportField: Packet {
    const REPORT_INDEX: usize;

    // Provided methods
    fn report(&self) -> Report { ... }
    fn report_raw(&self) -> u8 { ... }
    fn set_report(&mut self, report: impl Into<u8>) -> &mut Self { ... }
}
Expand description

A trait that adds additional setters for Response Packets.

All responses from jvs has report code that will indicate whether the request was processed successfully or not.

Required Associated Constants§

Provided Methods§

Source

fn report(&self) -> Report

Returns a report code.

Source

fn report_raw(&self) -> u8

Source

fn set_report(&mut self, report: impl Into<u8>) -> &mut Self

Sets a report code.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const N: usize> ReportField for jvs_packets::jvs::ResponsePacket<N>

Source§

const REPORT_INDEX: usize = 3usize

Source§

impl<const N: usize> ReportField for jvs_packets::jvs_modified::ResponsePacket<N>

Source§

const REPORT_INDEX: usize = 6usize