Struct CopilotBuilder
pub struct CopilotBuilder { /* private fields */ }Expand description
Typed builder for CopilotModelProvider.
Only alias is required. The GitHub token is optional at build time;
when unset, the provider will run the device-flow OAuth prompt on
first use.
Implementations§
Source§impl CopilotBuilder
impl CopilotBuilder
Sourcepub fn github_token(self, token: Option<&str>) -> CopilotBuilder
pub fn github_token(self, token: Option<&str>) -> CopilotBuilder
Set an explicit GitHub OAuth token. Empty strings are treated as missing.
pub fn build(self) -> CopilotModelProvider
Auto Trait Implementations§
impl Freeze for CopilotBuilder
impl RefUnwindSafe for CopilotBuilder
impl Send for CopilotBuilder
impl Sync for CopilotBuilder
impl Unpin for CopilotBuilder
impl UnsafeUnpin for CopilotBuilder
impl UnwindSafe for CopilotBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more