pub struct HttpApi {
pub mc_status_cache: Arc<RwLock<Option<(McStatusSnapshot, Instant)>>>,
/* private fields */
}Fields§
§mc_status_cache: Arc<RwLock<Option<(McStatusSnapshot, Instant)>>>Implementations§
Source§impl HttpApi
impl HttpApi
pub fn new( port: u16, sender: Arc<RwLock<MultiCommandSender>>, rcon_available: bool, mc_port: u16, mc_status_config: McStatusConfig, ) -> Self
pub async fn fetch_mc_status(&self) -> McStatusSnapshot
pub async fn start<S>(self: Arc<Self>, shutdown: S) -> Result<()>
Auto Trait Implementations§
impl !Freeze for HttpApi
impl !RefUnwindSafe for HttpApi
impl Send for HttpApi
impl Sync for HttpApi
impl Unpin for HttpApi
impl UnsafeUnpin for HttpApi
impl !UnwindSafe for HttpApi
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