pub struct SegmentTotalVoltages(/* private fields */);Implementations§
Source§impl SegmentTotalVoltages
impl SegmentTotalVoltages
Sourcepub const fn with_seg1_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_seg1_checked(self, value: f32) -> Result<Self, ()>
Total voltage of first segment
Units: V
Bits: 0..12
Sourcepub const fn with_seg1(self, value: f32) -> Self
pub const fn with_seg1(self, value: f32) -> Self
Total voltage of first segment
Units: V
Bits: 0..12
Sourcepub const fn set_seg1(&mut self, value: f32)
pub const fn set_seg1(&mut self, value: f32)
Total voltage of first segment
Units: V
Bits: 0..12
Sourcepub const fn set_seg1_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_seg1_checked(&mut self, value: f32) -> Result<(), ()>
Total voltage of first segment
Units: V
Bits: 0..12
Sourcepub const fn with_seg2_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_seg2_checked(self, value: f32) -> Result<Self, ()>
Total voltage of second segment
Units: V
Bits: 12..24
Sourcepub const fn with_seg2(self, value: f32) -> Self
pub const fn with_seg2(self, value: f32) -> Self
Total voltage of second segment
Units: V
Bits: 12..24
Sourcepub const fn set_seg2(&mut self, value: f32)
pub const fn set_seg2(&mut self, value: f32)
Total voltage of second segment
Units: V
Bits: 12..24
Sourcepub const fn set_seg2_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_seg2_checked(&mut self, value: f32) -> Result<(), ()>
Total voltage of second segment
Units: V
Bits: 12..24
Sourcepub const fn with_seg3_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_seg3_checked(self, value: f32) -> Result<Self, ()>
Total voltage of third segment
Units: V
Bits: 24..36
Sourcepub const fn with_seg3(self, value: f32) -> Self
pub const fn with_seg3(self, value: f32) -> Self
Total voltage of third segment
Units: V
Bits: 24..36
Sourcepub const fn set_seg3(&mut self, value: f32)
pub const fn set_seg3(&mut self, value: f32)
Total voltage of third segment
Units: V
Bits: 24..36
Sourcepub const fn set_seg3_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_seg3_checked(&mut self, value: f32) -> Result<(), ()>
Total voltage of third segment
Units: V
Bits: 24..36
Sourcepub const fn with_seg4_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_seg4_checked(self, value: f32) -> Result<Self, ()>
Total voltage of fourth segment
Units: V
Bits: 36..48
Sourcepub const fn with_seg4(self, value: f32) -> Self
pub const fn with_seg4(self, value: f32) -> Self
Total voltage of fourth segment
Units: V
Bits: 36..48
Sourcepub const fn set_seg4(&mut self, value: f32)
pub const fn set_seg4(&mut self, value: f32)
Total voltage of fourth segment
Units: V
Bits: 36..48
Sourcepub const fn set_seg4_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_seg4_checked(&mut self, value: f32) -> Result<(), ()>
Total voltage of fourth segment
Units: V
Bits: 36..48
Sourcepub const fn with_seg5_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_seg5_checked(self, value: f32) -> Result<Self, ()>
Total voltage of fifth segment
Units: V
Bits: 48..60
Sourcepub const fn with_seg5(self, value: f32) -> Self
pub const fn with_seg5(self, value: f32) -> Self
Total voltage of fifth segment
Units: V
Bits: 48..60
Source§impl SegmentTotalVoltages
impl SegmentTotalVoltages
Sourcepub fn try_with_seg1(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_seg1(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_seg1 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_seg1(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_seg1(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_seg1 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_seg2(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_seg2(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_seg2 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_seg2(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_seg2(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_seg2 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_seg3(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_seg3(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_seg3 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_seg3(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_seg3(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_seg3 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_seg4(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_seg4(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_seg4 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_seg4(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_seg4(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_seg4 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_seg5(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_seg5(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_seg5 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_seg5(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_seg5(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_seg5 but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for SegmentTotalVoltages
impl Clone for SegmentTotalVoltages
Source§fn clone(&self) -> SegmentTotalVoltages
fn clone(&self) -> SegmentTotalVoltages
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more