pub struct OwnedMtmdInputChunk { /* private fields */ }Expand description
A chunk that owns its allocation, as returned by
MtmdInputChunks::load_chunk or MtmdInputChunk::to_placeholder.
MtmdInputChunk borrows from the MtmdInputChunks list that holds it;
this one stands alone and frees itself on drop.
Implementations§
Source§impl OwnedMtmdInputChunk
impl OwnedMtmdInputChunk
Sourcepub fn chunk_type(&self) -> MtmdInputChunkType
pub fn chunk_type(&self) -> MtmdInputChunkType
The type of this chunk.
Sourcepub fn save(&self) -> Result<Vec<u8>>
pub fn save(&self) -> Result<Vec<u8>>
Serialize this chunk’s metadata, as MtmdInputChunk::save does.
§Errors
Returns MtmdError::ChunkSaveFailed if llama.cpp cannot serialize it.
Trait Implementations§
Source§impl Debug for OwnedMtmdInputChunk
impl Debug for OwnedMtmdInputChunk
Source§impl Drop for OwnedMtmdInputChunk
impl Drop for OwnedMtmdInputChunk
Auto Trait Implementations§
impl !Send for OwnedMtmdInputChunk
impl !Sync for OwnedMtmdInputChunk
impl Freeze for OwnedMtmdInputChunk
impl RefUnwindSafe for OwnedMtmdInputChunk
impl Unpin for OwnedMtmdInputChunk
impl UnsafeUnpin for OwnedMtmdInputChunk
impl UnwindSafe for OwnedMtmdInputChunk
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