Skip to main content

OperandEncodable

Trait OperandEncodable 

Source
pub trait OperandEncodable: Sized {
    // Required methods
    fn to_bytes(&self, buf: &mut impl Extend<u8>);
    fn try_from_bytes(bytes: &[u8]) -> Result<Self>;
    fn len(&self) -> usize;
    fn expected_len() -> Range<usize>;
}

Required Methods§

Source

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source

fn len(&self) -> usize

Source

fn expected_len() -> Range<usize>

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.

Implementations on Foreign Types§

Source§

impl OperandEncodable for bool

Source§

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source§

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source§

fn len(&self) -> usize

Source§

fn expected_len() -> Range<usize>

Source§

impl OperandEncodable for u8

Source§

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source§

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source§

fn len(&self) -> usize

Source§

fn expected_len() -> Range<usize>

Source§

impl OperandEncodable for u16

Source§

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source§

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source§

fn len(&self) -> usize

Source§

fn expected_len() -> Range<usize>

Source§

impl<T: OperandEncodable> OperandEncodable for Option<T>

Source§

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source§

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source§

fn len(&self) -> usize

Source§

fn expected_len() -> Range<usize>

Source§

impl<const S: usize> OperandEncodable for [u8; S]

Source§

fn to_bytes(&self, buf: &mut impl Extend<u8>)

Source§

fn try_from_bytes(bytes: &[u8]) -> Result<Self>

Source§

fn len(&self) -> usize

Source§

fn expected_len() -> Range<usize>

Implementors§

Source§

impl OperandEncodable for Message

Source§

impl OperandEncodable for linux_cec::cdc::Opcode

Source§

impl OperandEncodable for linux_cec::message::Opcode

Source§

impl OperandEncodable for AbortReason

Source§

impl OperandEncodable for AnalogueBroadcastType

Source§

impl OperandEncodable for AudioRate

Source§

impl OperandEncodable for BroadcastSystem

Source§

impl OperandEncodable for ChannelId

Source§

impl OperandEncodable for DayOfMonth

Source§

impl OperandEncodable for DeckControlMode

Source§

impl OperandEncodable for DeckInfo

Source§

impl OperandEncodable for DigitalServiceBroadcastSystem

Source§

impl OperandEncodable for DigitalServiceId

Source§

impl OperandEncodable for DisplayControl

Source§

impl OperandEncodable for ExternalSource

Source§

impl OperandEncodable for ExternalSourceSpecifier

Source§

impl OperandEncodable for MediaInfo

Source§

impl OperandEncodable for MenuRequestType

Source§

impl OperandEncodable for MenuState

Source§

impl OperandEncodable for MonthOfYear

Source§

impl OperandEncodable for PlayMode

Source§

impl OperandEncodable for PowerStatus

Source§

impl OperandEncodable for PrimaryDeviceType

Source§

impl OperandEncodable for RcProfileId

Source§

impl OperandEncodable for RecordSource

Source§

impl OperandEncodable for RecordSourceType

Source§

impl OperandEncodable for RecordStatusInfo

Source§

impl OperandEncodable for StatusRequest

Source§

impl OperandEncodable for TimerClearedStatusData

Source§

impl OperandEncodable for TunerDisplayInfo

Source§

impl OperandEncodable for UiBroadcastType

Source§

impl OperandEncodable for UiCommand

Source§

impl OperandEncodable for UiSoundPresentationControl

Source§

impl OperandEncodable for Version

Source§

impl OperandEncodable for HecField

Source§

impl OperandEncodable for HecState

Source§

impl OperandEncodable for HpdStateErrorCode

Source§

impl OperandEncodable for InputPortHpdState

Source§

impl OperandEncodable for PhysicalAddress

Source§

impl OperandEncodable for VendorId

Source§

impl OperandEncodable for AllDeviceTypes

Source§

impl OperandEncodable for AnalogueServiceId

Source§

impl OperandEncodable for AribData

Source§

impl OperandEncodable for AtscData

Source§

impl OperandEncodable for AudioFormatIdAndCode

Source§

impl OperandEncodable for AudioStatus

Source§

impl OperandEncodable for AudioVolumeLevel

Source§

impl OperandEncodable for Delay

Source§

impl OperandEncodable for DeviceFeatures1

Source§

impl OperandEncodable for Duration

Source§

impl OperandEncodable for DvbData

Source§

impl OperandEncodable for LatencyFlags

Source§

impl OperandEncodable for RcProfileSource

Source§

impl OperandEncodable for RecordingSequence

Source§

impl OperandEncodable for Time

Source§

impl OperandEncodable for TimerStatusData

Source§

impl OperandEncodable for TunerDeviceInfo

Source§

impl<T: TryFrom<u8> + Into<u8> + Copy, U: TaggedLengthBuffer<FixedParam = T>> OperandEncodable for U
where Error: From<<T as TryFrom<u8>>::Error>,

Source§

impl<const MIN: u8, const MAX: u8> OperandEncodable for BcdByte<MIN, MAX>

Source§

impl<const S: usize, T: OperandEncodable + Default + Copy> OperandEncodable for BoundedBufferOperand<S, T>