pub struct ConnectionCosts<'a> {
pub left_size: usize,
pub right_size: usize,
pub data_offset: usize,
pub data: &'a [u8],
}Expand description
Bundled connection cost lookup: matrix metadata + backing data slice. Used by the lattice and tokenizer hot path to avoid passing two separate arguments.
Fields§
§left_size: usize§right_size: usize§data_offset: usize§data: &'a [u8]Implementations§
Source§impl<'a> ConnectionCosts<'a>
impl<'a> ConnectionCosts<'a>
Sourcepub fn new(matrix: &ConnectionMatrix, data: &'a [u8]) -> Self
pub fn new(matrix: &ConnectionMatrix, data: &'a [u8]) -> Self
Create from a ConnectionMatrix and its backing data.
Trait Implementations§
Source§impl<'a> Clone for ConnectionCosts<'a>
impl<'a> Clone for ConnectionCosts<'a>
Source§fn clone(&self) -> ConnectionCosts<'a>
fn clone(&self) -> ConnectionCosts<'a>
Returns a duplicate of the value. Read more
1.0.0 · 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 ConnectionCosts<'a>
impl<'a> Debug for ConnectionCosts<'a>
impl<'a> Copy for ConnectionCosts<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConnectionCosts<'a>
impl<'a> RefUnwindSafe for ConnectionCosts<'a>
impl<'a> Send for ConnectionCosts<'a>
impl<'a> Sync for ConnectionCosts<'a>
impl<'a> Unpin for ConnectionCosts<'a>
impl<'a> UnsafeUnpin for ConnectionCosts<'a>
impl<'a> UnwindSafe for ConnectionCosts<'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