pub struct ApiState {Show 14 fields
pub server_url: String,
pub api_key: Option<String>,
pub model_name: String,
pub pid: u32,
pub start_time: Instant,
pub port: u16,
pub client: Client,
pub status_cache: Arc<RwLock<StatusCache>>,
pub system_prompt_preset_name: String,
pub web_search_engine: String,
pub web_search_engine_url: String,
pub web_search_enabled: bool,
pub web_search_api_key: Option<String>,
pub log_callback: Arc<Mutex<Option<Box<dyn Fn(String) + Send + Sync>>>>,
}Fields§
§server_url: String§api_key: Option<String>§model_name: String§pid: u32§start_time: Instant§port: u16§client: Client§status_cache: Arc<RwLock<StatusCache>>§system_prompt_preset_name: String§web_search_engine: String§web_search_engine_url: String§web_search_enabled: bool§web_search_api_key: Option<String>§log_callback: Arc<Mutex<Option<Box<dyn Fn(String) + Send + Sync>>>>Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ApiState
impl !UnwindSafe for ApiState
impl Freeze for ApiState
impl Send for ApiState
impl Sync for ApiState
impl Unpin for ApiState
impl UnsafeUnpin for ApiState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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