pub struct DateService { /* private fields */ }Expand description
A service that maintains and periodically updates the current HTTP date string.
This service runs a background task that updates the date string every 700ms, providing an efficient way to access formatted HTTP date strings without formatting them on every request.
Implementations§
Source§impl DateService
impl DateService
Sourcepub fn get_global_instance() -> &'static DateService
pub fn get_global_instance() -> &'static DateService
Returns a reference to the global singleton instance of DateService.
This method provides access to a shared DateService instance that can be used
across the application to efficiently handle HTTP date headers.
§Returns
A static reference to the global DateService instance.
Trait Implementations§
Source§impl Debug for DateService
impl Debug for DateService
Auto Trait Implementations§
impl Freeze for DateService
impl RefUnwindSafe for DateService
impl Send for DateService
impl Sync for DateService
impl Unpin for DateService
impl UnwindSafe for DateService
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