pub struct CodingModelRoleConfig { /* private fields */ }Expand description
A provider-neutral model/provider pair for one non-primary runtime role.
Provider adapters are represented by the Merry-owned ModelProvider trait;
provider wire request and response types never cross this contract.
Implementations§
Source§impl CodingModelRoleConfig
impl CodingModelRoleConfig
Sourcepub fn new(
role: RuntimeModelRole,
provider: Arc<dyn ModelProvider>,
model: ModelName,
) -> Result<Self, CodingModelRoleConfigError>
pub fn new( role: RuntimeModelRole, provider: Arc<dyn ModelProvider>, model: ModelName, ) -> Result<Self, CodingModelRoleConfigError>
Creates a role-specific model configuration.
Sourcepub const fn role(&self) -> RuntimeModelRole
pub const fn role(&self) -> RuntimeModelRole
Returns the runtime role receiving this provider/model pair.
Sourcepub fn provider(&self) -> Arc<dyn ModelProvider> ⓘ
pub fn provider(&self) -> Arc<dyn ModelProvider> ⓘ
Returns the provider handle for this role.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CodingModelRoleConfig
impl !UnwindSafe for CodingModelRoleConfig
impl Forget for CodingModelRoleConfig
impl Freeze for CodingModelRoleConfig
impl Move for CodingModelRoleConfig
impl Send for CodingModelRoleConfig
impl Sync for CodingModelRoleConfig
impl Unpin for CodingModelRoleConfig
impl UnsafeUnpin for CodingModelRoleConfig
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