pub(crate) enum LevelDataRef<'a> {
Absent,
Materialized(&'a [i16]),
Uniform {
value: i16,
count: usize,
},
}Expand description
Borrowed view of level data, analogous to &str for LevelData’s String.
LevelDataRef can be constructed from LevelData and directly from an existing
&[i16] without allocating.
The variants are different physical representations of the same logical sequence of levels.
Variants§
Implementations§
Trait Implementations§
Source§impl<'a> Clone for LevelDataRef<'a>
impl<'a> Clone for LevelDataRef<'a>
Source§fn clone(&self) -> LevelDataRef<'a>
fn clone(&self) -> LevelDataRef<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for LevelDataRef<'a>
impl<'a> Debug for LevelDataRef<'a>
Source§impl<'a> From<&'a [i16]> for LevelDataRef<'a>
impl<'a> From<&'a [i16]> for LevelDataRef<'a>
impl<'a> Copy for LevelDataRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for LevelDataRef<'a>
impl<'a> RefUnwindSafe for LevelDataRef<'a>
impl<'a> Send for LevelDataRef<'a>
impl<'a> Sync for LevelDataRef<'a>
impl<'a> Unpin for LevelDataRef<'a>
impl<'a> UnsafeUnpin for LevelDataRef<'a>
impl<'a> UnwindSafe for LevelDataRef<'a>
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