pub struct ProtocolLoader { /* private fields */ }Expand description
Protocol loader that supports multiple sources
Implementations§
Source§impl ProtocolLoader
impl ProtocolLoader
pub fn new() -> ProtocolLoader
Sourcepub fn with_base_path(self, path: impl AsRef<Path>) -> ProtocolLoader
pub fn with_base_path(self, path: impl AsRef<Path>) -> ProtocolLoader
Set base path for protocol files
Sourcepub fn with_hot_reload(self, enable: bool) -> ProtocolLoader
pub fn with_hot_reload(self, enable: bool) -> ProtocolLoader
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§
Source§impl Default for ProtocolLoader
impl Default for ProtocolLoader
Source§fn default() -> ProtocolLoader
fn default() -> ProtocolLoader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ProtocolLoader
impl !RefUnwindSafe for ProtocolLoader
impl Send for ProtocolLoader
impl Sync for ProtocolLoader
impl Unpin for ProtocolLoader
impl UnsafeUnpin 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