Struct esp_idf_hal::rmt::VariableLengthSignal
source · 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.
capacity
is the number ofPulse
s 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,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)