pub struct ArtnetDMXAddress { /* private fields */ }Expand description
A DMX address: a universe and a channel in it. Derived from the patch
(see Patch::addresses), which keeps the universe at most
MAX_UNIVERSE and the channel inside the universe.
Implementations§
Source§impl ArtnetDMXAddress
impl ArtnetDMXAddress
pub fn into_pair(self) -> (u16, u16)
pub fn from_pair((universe, channel): (u16, u16)) -> Self
pub fn universe(self) -> u16
pub fn channel(self) -> u16
Sourcepub fn lamp_index(self, channel_offset: u16) -> usize
pub fn lamp_index(self, channel_offset: u16) -> usize
The lamp of its universe that the channel channel_offset past this
address belongs to: lamp i starts at channel 3 i.
Trait Implementations§
Source§impl Clone for ArtnetDMXAddress
impl Clone for ArtnetDMXAddress
impl Copy for ArtnetDMXAddress
Source§impl Debug for ArtnetDMXAddress
impl Debug for ArtnetDMXAddress
Source§impl Display for ArtnetDMXAddress
impl Display for ArtnetDMXAddress
impl Eq for ArtnetDMXAddress
Source§impl Hash for ArtnetDMXAddress
impl Hash for ArtnetDMXAddress
Source§impl Ord for ArtnetDMXAddress
impl Ord for ArtnetDMXAddress
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ArtnetDMXAddress
impl PartialEq for ArtnetDMXAddress
Source§impl PartialOrd for ArtnetDMXAddress
impl PartialOrd for ArtnetDMXAddress
impl StructuralPartialEq for ArtnetDMXAddress
Auto Trait Implementations§
impl Freeze for ArtnetDMXAddress
impl RefUnwindSafe for ArtnetDMXAddress
impl Send for ArtnetDMXAddress
impl Sync for ArtnetDMXAddress
impl Unpin for ArtnetDMXAddress
impl UnsafeUnpin for ArtnetDMXAddress
impl UnwindSafe for ArtnetDMXAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more