pub struct VariableLengthSignal { /* private fields */ }Expand description
Vec heap based storage for an RMT signal.
Use this for when you don’t know the final size of your signal data.
§Example
let mut signal = VariableLengthSignal::new();
signal.push(Pulse::new(PinState::High, PulseTicks::new(10)));
signal.push(Pulse::new(PinState::Low, PulseTicks::new(9)));Implementations§
Source§impl VariableLengthSignal
impl VariableLengthSignal
pub const fn new() -> Self
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new VariableLengthSignal with a a given capacity. This is
more efficent than not specifying the capacity with new( ) as the
memory manager only needs to allocate the underlying array once.
capacityis the number ofPulses which can be pushes before reallocating
Trait Implementations§
Source§impl Clone for VariableLengthSignal
impl Clone for VariableLengthSignal
Source§fn clone(&self) -> VariableLengthSignal
fn clone(&self) -> VariableLengthSignal
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for VariableLengthSignal
impl Default for VariableLengthSignal
Source§fn default() -> VariableLengthSignal
fn default() -> VariableLengthSignal
Returns the “default value” for a type. Read more
Source§impl Signal for VariableLengthSignal
impl Signal for VariableLengthSignal
fn as_slice(&self) -> &[rmt_item32_t]
Auto Trait Implementations§
impl Freeze for VariableLengthSignal
impl RefUnwindSafe for VariableLengthSignal
impl Send for VariableLengthSignal
impl Sync for VariableLengthSignal
impl Unpin for VariableLengthSignal
impl UnwindSafe for VariableLengthSignal
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)