#[non_exhaustive]pub struct DecodedRegion {
pub offset: usize,
pub length: usize,
pub decoded_bytes: Vec<u8>,
}Expand description
A decoded region produced by one decode pass.
This struct is #[non_exhaustive] to allow adding new region metadata
(like character encoding or confidence scores) without breaking consumers.
§Examples
use vyre_wgpu::engine::decode::DecodedRegion;
let region = DecodedRegion::new(0, 4, vec![1, 2, 3]);
assert_eq!(region.decoded_bytes.len(), 3);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.offset: usizeSource offset of the encoded region.
length: usizeSource length of the encoded region.
decoded_bytes: Vec<u8>Decoded bytes emitted for the region.
Implementations§
Trait Implementations§
Source§impl Clone for DecodedRegion
impl Clone for DecodedRegion
Source§fn clone(&self) -> DecodedRegion
fn clone(&self) -> DecodedRegion
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 Debug for DecodedRegion
impl Debug for DecodedRegion
Source§impl Hash for DecodedRegion
impl Hash for DecodedRegion
Source§impl PartialEq for DecodedRegion
impl PartialEq for DecodedRegion
impl Eq for DecodedRegion
impl StructuralPartialEq for DecodedRegion
Auto Trait Implementations§
impl Freeze for DecodedRegion
impl RefUnwindSafe for DecodedRegion
impl Send for DecodedRegion
impl Sync for DecodedRegion
impl Unpin for DecodedRegion
impl UnsafeUnpin for DecodedRegion
impl UnwindSafe for DecodedRegion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.