pub struct AppContext<F: Future<Output = RUMResult<()>>> {
pub ip: Option<RUMString>,
pub port: Option<u16>,
pub logic: Option<F>,
pub components: AppComponents<'static>,
pub switches: AppSwitches,
pub state: SharedAppState,
}Expand description
Struct encapsulating custom-made items to register with the framework.
Fields§
§ip: Option<RUMString>§port: Option<u16>§logic: Option<F>§components: AppComponents<'static>§switches: AppSwitches§state: SharedAppStateImplementations§
Source§impl<F> AppContext<F>
impl<F> AppContext<F>
pub fn new() -> AppContext<F>
pub fn init_ip(self, ip: RUMString) -> AppContext<F>
pub fn init_port(self, port: u16) -> AppContext<F>
pub fn init_logic(self, logic: F) -> AppContext<F>
pub fn init_components( self, components: AppComponents<'static>, ) -> AppContext<F>
pub fn init_switches(self, switches: AppSwitches) -> AppContext<F>
pub fn init_state(self, state: SharedAppState) -> AppContext<F>
Trait Implementations§
Auto Trait Implementations§
impl<F> !RefUnwindSafe for AppContext<F>
impl<F> !UnwindSafe for AppContext<F>
impl<F> Forget for AppContext<F>
impl<F> Freeze for AppContext<F>where
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
F: Freeze,
PhantomData<(&'static str, fn(Arc<RwLock<AppState>>) -> Result<Vec<String>, String>)>: Freeze,
PhantomData<(&'static str, fn(fn(&str, &str, InputProps<'_>, &str) -> Result<FormNode, String>, &Arc<RwLock<AppState>>) -> Vec<Result<FormNode, String>>)>: Freeze,
PhantomData<(&'static str, fn(String, HashMap<String, String>, FormData, Arc<RwLock<AppState>>) -> Result<RUMWebResponse, String>)>: Freeze,
*const ArcInner<RwLock<AppState>> is !null: Freeze,
PhantomData<ArcInner<RwLock<AppState>>>: Freeze,
impl<F> Move for AppContext<F>
impl<F> Send for AppContext<F>
impl<F> Sync for AppContext<F>
impl<F> Unpin for AppContext<F>
impl<F> UnsafeUnpin for AppContext<F>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
F: UnsafeUnpin,
PhantomData<(&'static str, fn(Arc<RwLock<AppState>>) -> Result<Vec<String>, String>)>: UnsafeUnpin,
PhantomData<(&'static str, fn(fn(&str, &str, InputProps<'_>, &str) -> Result<FormNode, String>, &Arc<RwLock<AppState>>) -> Vec<Result<FormNode, String>>)>: UnsafeUnpin,
PhantomData<(&'static str, fn(String, HashMap<String, String>, FormData, Arc<RwLock<AppState>>) -> Result<RUMWebResponse, String>)>: UnsafeUnpin,
*const ArcInner<RwLock<AppState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<AppState>>>: UnsafeUnpin,
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