pub struct RawF32Codec { /* private fields */ }Expand description
Reference codec that stores raw little-endian f32 bytes.
Implementations§
Source§impl RawF32Codec
impl RawF32Codec
Sourcepub fn new(dim: usize) -> Result<Self, MemoryError>
pub fn new(dim: usize) -> Result<Self, MemoryError>
Create a raw f32 codec for dim dimensions.
Trait Implementations§
Source§impl Clone for RawF32Codec
impl Clone for RawF32Codec
Source§fn clone(&self) -> RawF32Codec
fn clone(&self) -> RawF32Codec
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 Debug for RawF32Codec
impl Debug for RawF32Codec
Source§impl VectorCodec for RawF32Codec
impl VectorCodec for RawF32Codec
Source§fn profile(&self) -> &VectorCodecProfileV1
fn profile(&self) -> &VectorCodecProfileV1
Codec profile identity.
Source§fn encode(&self, vector: &[f32]) -> Result<VectorArtifactV1, MemoryError>
fn encode(&self, vector: &[f32]) -> Result<VectorArtifactV1, MemoryError>
Encode a raw f32 vector into a byte artifact.
Source§fn decode(&self, artifact: &VectorArtifactV1) -> Result<Vec<f32>, MemoryError>
fn decode(&self, artifact: &VectorArtifactV1) -> Result<Vec<f32>, MemoryError>
Decode an artifact back to f32 for reference scoring or differential tests.
Auto Trait Implementations§
impl Freeze for RawF32Codec
impl RefUnwindSafe for RawF32Codec
impl Send for RawF32Codec
impl Sync for RawF32Codec
impl Unpin for RawF32Codec
impl UnsafeUnpin for RawF32Codec
impl UnwindSafe for RawF32Codec
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