pub struct GroupObject { /* private fields */ }Expand description
A KNX group object.
Implementations§
Source§impl GroupObject
impl GroupObject
Sourcepub fn new(
address: GroupAddress,
name: impl Into<String>,
codec: Arc<BoxedDptCodec>,
) -> Self
pub fn new( address: GroupAddress, name: impl Into<String>, codec: Arc<BoxedDptCodec>, ) -> Self
Create a new group object.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Create with description.
Sourcepub fn with_flags(self, flags: GroupObjectFlags) -> Self
pub fn with_flags(self, flags: GroupObjectFlags) -> Self
Set flags.
Sourcepub fn with_value(self, value: &DptValue) -> KnxResult<Self>
pub fn with_value(self, value: &DptValue) -> KnxResult<Self>
Set initial value.
Sourcepub fn address(&self) -> GroupAddress
pub fn address(&self) -> GroupAddress
Get group address.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get description.
Sourcepub fn flags(&self) -> GroupObjectFlags
pub fn flags(&self) -> GroupObjectFlags
Get flags.
Sourcepub fn read_value(&self) -> KnxResult<DptValue>
pub fn read_value(&self) -> KnxResult<DptValue>
Read decoded value.
Sourcepub fn write_value(&self, value: &DptValue) -> KnxResult<()>
pub fn write_value(&self, value: &DptValue) -> KnxResult<()>
Write decoded value.
Sourcepub fn last_update(&self) -> Instant
pub fn last_update(&self) -> Instant
Get last update time.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GroupObject
impl !RefUnwindSafe for GroupObject
impl Send for GroupObject
impl Sync for GroupObject
impl Unpin for GroupObject
impl UnsafeUnpin for GroupObject
impl !UnwindSafe for GroupObject
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