pub struct GroupTelegram { /* private fields */ }Implementations§
Source§impl GroupTelegram
impl GroupTelegram
Sourcepub fn new(
source: IndividualAddress,
destination: GroupAddress,
apci: Apci,
payload: &[u8],
) -> Result<Self>
pub fn new( source: IndividualAddress, destination: GroupAddress, apci: Apci, payload: &[u8], ) -> Result<Self>
Builds a validated group telegram.
Payload rules:
GroupValueReadcarries no payload (a non-empty payload is rejected).GroupValueWrite/GroupValueResponsemust carry a payload. An empty Write/Response payload is rejected because it is ambiguous with the compact one-byte zero value on APDU decode (a 2-byte compact APDU always decodes back to[0x00], never to an empty payload), so an empty Write/Response could not round-trip distinctly.[0x00]remains a valid compact one-byte value payload.- Payloads longer than 254 bytes are rejected.
pub const fn source(&self) -> IndividualAddress
pub const fn destination(&self) -> GroupAddress
pub const fn apci(&self) -> Apci
pub fn payload(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for GroupTelegram
impl Clone for GroupTelegram
Source§fn clone(&self) -> GroupTelegram
fn clone(&self) -> GroupTelegram
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GroupTelegram
impl Debug for GroupTelegram
impl Eq for GroupTelegram
Source§impl PartialEq for GroupTelegram
impl PartialEq for GroupTelegram
Source§fn eq(&self, other: &GroupTelegram) -> bool
fn eq(&self, other: &GroupTelegram) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GroupTelegram
Auto Trait Implementations§
impl Freeze for GroupTelegram
impl RefUnwindSafe for GroupTelegram
impl Send for GroupTelegram
impl Sync for GroupTelegram
impl Unpin for GroupTelegram
impl UnsafeUnpin for GroupTelegram
impl UnwindSafe for GroupTelegram
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