pub struct DmxUniverse {
pub channel_count: u16,
/* private fields */
}
Fields§
§channel_count: u16
Implementations§
Source§impl DmxUniverse
impl DmxUniverse
pub fn new(channel_count: u16) -> Result<Self, DmxError>
pub fn reset(&mut self)
pub fn get_channel_value(&self, channel: u16) -> Result<u8, DmxError>
pub fn get_channel_values( &self, range: RangeInclusive<u16>, ) -> Result<&[u8], DmxError>
pub fn set_channel_value( &mut self, channel: u16, value: u8, ) -> Result<(), DmxError>
pub fn set_channel_values( &mut self, channel: u16, values: &[u8], ) -> Result<(), DmxError>
pub fn set_all_channel_values(&mut self, value: u8)
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn extend(&mut self, values: &[u8]) -> Result<(), DmxError>
pub fn decode(bytes: &[u8]) -> Result<Self, DmxError>
pub fn encode(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for DmxUniverse
impl Clone for DmxUniverse
Source§fn clone(&self) -> DmxUniverse
fn clone(&self) -> DmxUniverse
Returns a duplicate of the value. Read more
1.0.0 · 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 DmxUniverse
impl Debug for DmxUniverse
Source§impl Default for DmxUniverse
impl Default for DmxUniverse
Source§impl From<DmxUniverse> for Vec<u8>
impl From<DmxUniverse> for Vec<u8>
Source§fn from(universe: DmxUniverse) -> Self
fn from(universe: DmxUniverse) -> Self
Converts to this type from the input type.
Source§impl Index<u16> for DmxUniverse
impl Index<u16> for DmxUniverse
Source§impl IndexMut<u16> for DmxUniverse
impl IndexMut<u16> for DmxUniverse
Source§impl PartialEq for DmxUniverse
impl PartialEq for DmxUniverse
Source§impl TryFrom<&[u8]> for DmxUniverse
impl TryFrom<&[u8]> for DmxUniverse
impl StructuralPartialEq for DmxUniverse
Auto Trait Implementations§
impl Freeze for DmxUniverse
impl RefUnwindSafe for DmxUniverse
impl Send for DmxUniverse
impl Sync for DmxUniverse
impl Unpin for DmxUniverse
impl UnwindSafe for DmxUniverse
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