pub struct DefaultEngine { /* private fields */ }Expand description
Standalone engine: crypto via KeyRing, sprites via CpuRenderer.
infer returns EngineError::Unsupported — real inference needs the
engine feature (combs-runtime), wired up in combs-mesh-ffi.
Implementations§
Source§impl DefaultEngine
impl DefaultEngine
Trait Implementations§
Source§impl CombsEngineCore for DefaultEngine
impl CombsEngineCore for DefaultEngine
Source§fn init(&self, key: &[u8]) -> Result<(), EngineError>
fn init(&self, key: &[u8]) -> Result<(), EngineError>
Initializes the engine with a master key (HKDF input).
Source§fn infer(&self, _prompt: &str) -> Result<String, EngineError>
fn infer(&self, _prompt: &str) -> Result<String, EngineError>
Runs inference on
prompt. Requires the engine feature.Source§fn encrypt_memory(&self, data: &[u8]) -> Result<Vec<u8>, EngineError>
fn encrypt_memory(&self, data: &[u8]) -> Result<Vec<u8>, EngineError>
Encrypts a memory blob (nonce-prefixed AEAD).
Source§fn decrypt_memory(&self, data: &[u8]) -> Result<Vec<u8>, EngineError>
fn decrypt_memory(&self, data: &[u8]) -> Result<Vec<u8>, EngineError>
Decrypts a blob produced by
CombsEngineCore::encrypt_memory.Source§fn render_sprite(
&self,
emoji: &Emoji,
frame_index: u32,
) -> Result<Vec<u8>, EngineError>
fn render_sprite( &self, emoji: &Emoji, frame_index: u32, ) -> Result<Vec<u8>, EngineError>
Renders frame
frame_index of the emoji’s first sprite atlas to
RGBA8 bytes.Auto Trait Implementations§
impl !Freeze for DefaultEngine
impl RefUnwindSafe for DefaultEngine
impl Send for DefaultEngine
impl Sync for DefaultEngine
impl Unpin for DefaultEngine
impl UnsafeUnpin for DefaultEngine
impl UnwindSafe for DefaultEngine
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