pub struct ServerStatus { /* private fields */ }Expand description
服务器状态跟踪器
使用原子操作跟踪服务器状态和性能指标,确保线程安全
Implementations§
Source§impl ServerStatus
impl ServerStatus
Sourcepub fn increment_document_count(&self)
pub fn increment_document_count(&self)
增加文档计数
Sourcepub fn decrement_document_count(&self)
pub fn decrement_document_count(&self)
减少文档计数
Sourcepub fn record_request(&self)
pub fn record_request(&self)
记录请求
Sourcepub fn record_error(&self)
pub fn record_error(&self)
记录错误
Sourcepub fn record_completion(&self)
pub fn record_completion(&self)
记录补全请求
Sourcepub fn record_hover(&self)
pub fn record_hover(&self)
记录悬停请求
Sourcepub fn record_diagnostic(&self)
pub fn record_diagnostic(&self)
记录诊断发布
Sourcepub fn get_metrics(&self) -> ServerMetrics
pub fn get_metrics(&self) -> ServerMetrics
获取性能指标
Trait Implementations§
Source§impl Clone for ServerStatus
impl Clone for ServerStatus
Source§fn clone(&self) -> ServerStatus
fn clone(&self) -> ServerStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerStatus
impl RefUnwindSafe for ServerStatus
impl Send for ServerStatus
impl Sync for ServerStatus
impl Unpin for ServerStatus
impl UnwindSafe for ServerStatus
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
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