pub struct Key<R: Copy, const MAX_OVERLAPPING: usize> {
pub sequences: Slice<(SequenceId, R), MAX_OVERLAPPING>,
pub passthrough: R,
}Expand description
Primary sequence key: bindings + passthrough.
Fields§
§sequences: Slice<(SequenceId, R), MAX_OVERLAPPING>Sequences for which this key is primary (lowest index), with bound keys.
passthrough: RKey when sequence mode is inactive.
Implementations§
Source§impl<R: Copy, const MAX_OVERLAPPING: usize> Key<R, MAX_OVERLAPPING>
impl<R: Copy, const MAX_OVERLAPPING: usize> Key<R, MAX_OVERLAPPING>
Sourcepub const fn new(sequences: &[(SequenceId, R)], passthrough: R) -> Self
pub const fn new(sequences: &[(SequenceId, R)], passthrough: R) -> Self
Constructs a primary sequence key.
Sourcepub fn binding_for(&self, id: SequenceId) -> Option<R>
pub fn binding_for(&self, id: SequenceId) -> Option<R>
Bound key for sequence id, if this primary owns it.
Trait Implementations§
impl<R: Copy + Copy, const MAX_OVERLAPPING: usize> Copy for Key<R, MAX_OVERLAPPING>
Source§impl<'de, R, const MAX_OVERLAPPING: usize> Deserialize<'de> for Key<R, MAX_OVERLAPPING>where
R: Deserialize<'de> + Copy,
impl<'de, R, const MAX_OVERLAPPING: usize> Deserialize<'de> for Key<R, MAX_OVERLAPPING>where
R: Deserialize<'de> + Copy,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<R: PartialEq + Copy, const MAX_OVERLAPPING: usize> PartialEq for Key<R, MAX_OVERLAPPING>
impl<R: PartialEq + Copy, const MAX_OVERLAPPING: usize> PartialEq for Key<R, MAX_OVERLAPPING>
impl<R: PartialEq + Copy, const MAX_OVERLAPPING: usize> StructuralPartialEq for Key<R, MAX_OVERLAPPING>
Auto Trait Implementations§
impl<R, const MAX_OVERLAPPING: usize> Freeze for Key<R, MAX_OVERLAPPING>where
R: Freeze,
impl<R, const MAX_OVERLAPPING: usize> RefUnwindSafe for Key<R, MAX_OVERLAPPING>where
R: RefUnwindSafe,
impl<R, const MAX_OVERLAPPING: usize> Send for Key<R, MAX_OVERLAPPING>where
R: Send,
impl<R, const MAX_OVERLAPPING: usize> Sync for Key<R, MAX_OVERLAPPING>where
R: Sync,
impl<R, const MAX_OVERLAPPING: usize> Unpin for Key<R, MAX_OVERLAPPING>where
R: Unpin,
impl<R, const MAX_OVERLAPPING: usize> UnsafeUnpin for Key<R, MAX_OVERLAPPING>where
R: UnsafeUnpin,
impl<R, const MAX_OVERLAPPING: usize> UnwindSafe for Key<R, MAX_OVERLAPPING>where
R: UnwindSafe,
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