pub struct ProtocolLoader { /* private fields */ }Expand description
Protocol loader that supports multiple sources
Implementations§
Source§impl ProtocolLoader
impl ProtocolLoader
pub fn new() -> Self
Sourcepub fn with_base_path(self, path: impl AsRef<Path>) -> Self
pub fn with_base_path(self, path: impl AsRef<Path>) -> Self
Set base path for protocol files
Sourcepub fn with_hot_reload(self, enable: bool) -> Self
pub fn with_hot_reload(self, enable: bool) -> Self
Enable hot reload
Sourcepub async fn load_model(
&self,
model: &str,
) -> Result<ProtocolManifest, ProtocolError>
pub async fn load_model( &self, model: &str, ) -> Result<ProtocolManifest, ProtocolError>
Load a model configuration Model identifier format: “provider/model-name”
Sourcepub async fn load_provider(
&self,
provider_id: &str,
) -> Result<ProtocolManifest, ProtocolError>
pub async fn load_provider( &self, provider_id: &str, ) -> Result<ProtocolManifest, ProtocolError>
Load provider configuration
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ProtocolLoader
impl !RefUnwindSafe for ProtocolLoader
impl Send for ProtocolLoader
impl Sync for ProtocolLoader
impl Unpin for ProtocolLoader
impl !UnwindSafe for ProtocolLoader
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