pub struct AppState {
pub inner: Arc<RwLock<AppStateInner>>,
pub ws_event_bus: Arc<WebSocketEventBus>,
pub setup_lock: Arc<Mutex<()>>,
pub download_tickets: Arc<DownloadTickets>,
pub pairing_codes: Arc<PairingCodes>,
pub desktop_host: Option<Arc<str>>,
pub push_relay: Option<Arc<str>>,
pub closing: Arc<Sender<bool>>,
/* private fields */
}Fields§
§inner: Arc<RwLock<AppStateInner>>§ws_event_bus: Arc<WebSocketEventBus>§setup_lock: Arc<Mutex<()>>§download_tickets: Arc<DownloadTickets>§pairing_codes: Arc<PairingCodes>§desktop_host: Option<Arc<str>>§push_relay: Option<Arc<str>>§closing: Arc<Sender<bool>>Implementations§
Source§impl AppState
impl AppState
pub fn setup_mode(ws_event_bus: Arc<WebSocketEventBus>) -> Self
pub fn config_error(ws_event_bus: Arc<WebSocketEventBus>, error: String) -> Self
pub fn initialized( ws_event_bus: Arc<WebSocketEventBus>, core: CoreContext, storage_manager: StorageManager, ) -> Self
pub fn hosted( ws_event_bus: Arc<WebSocketEventBus>, core: Option<CoreContext>, name: &str, ) -> Self
pub async fn set_core(&self, core: Option<CoreContext>)
pub fn api_token(&self) -> Option<Arc<str>>
pub fn set_api_token(&self, token: &str)
pub fn requires_auth(&self) -> bool
pub async fn paired_device( &self, token: &str, ) -> Result<Option<PairedDevice>, DomainError>
pub fn with_push_relay(self, url: &str) -> Self
pub async fn push_relay_url(&self) -> Option<String>
pub async fn core(&self) -> ApiResult<CoreContext>
pub async fn provider_service(&self) -> ApiResult<Arc<ProviderService>>
pub async fn pipeline_service(&self) -> ApiResult<Arc<PipelineService>>
pub async fn pipeline_view_service(&self) -> ApiResult<Arc<PipelineViewService>>
pub async fn log_service(&self) -> ApiResult<Arc<LogService>>
pub async fn config_state(&self) -> ApiResult<Arc<ConfigState>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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<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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more