Struct tauri::Context
pub struct Context<A: Assets> { /* fields omitted */ }
Expand description
User supplied data required inside of a Tauri application.
#
StabilityThis is the output of the tauri::generate_context!
macro, and is not considered part of the stable API. Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself.
#
ImplementationsAssets> Context<A>[src]#
impl<A:config(&self) -> &Config[src]#
pub fnThe config the application was prepared with.
config_mut(&mut self) -> &mut Config[src]#
pub fnA mutable reference to the config the application was prepared with.
assets(&self) -> Arc<A>[src]#
pub fnThe assets to be served directly by Tauri.
assets_mut(&mut self) -> &mut Arc<A>[src]#
pub fnA mutable reference to the assets to be served directly by Tauri.
default_window_icon(&self) -> Option<&[u8]>[src]#
pub fnThe default window icon Tauri should use when creating windows.
default_window_icon_mut(&mut self) -> &mut Option<Vec<u8>>[src]#
pub fnA mutable reference to the default window icon Tauri should use when creating windows.
system_tray_icon(&self) -> Option<&Icon>[src]#
pub fnThe icon to use on the system tray UI.
system_tray_icon_mut(&mut self) -> &mut Option<Icon>[src]#
pub fnA mutable reference to the icon to use on the system tray UI.
package_info(&self) -> &PackageInfo[src]#
pub fnPackage information.
package_info_mut(&mut self) -> &mut PackageInfo[src]#
pub fnA mutable reference to the package information.
new( config: Config, assets: Arc<A>, default_window_icon: Option<Vec<u8>>, system_tray_icon: Option<Icon>, package_info: PackageInfo, info_plist: () ) -> Self[src]#
pub fnCreate a new Context
from the minimal required items.
#
Trait ImplementationsAssets> Debug for Context<A>[src]#
impl<A:fmt(&self, f: &mut Formatter<'_>) -> Result[src]#
fnFormats the value using the given formatter. Read more
#
Auto Trait ImplementationsRefUnwindSafe for Context<A> where A: RefUnwindSafe,#
impl<A>Send for Context<A>#
impl<A>Sync for Context<A>#
impl<A>Unpin for Context<A>#
impl<A>UnwindSafe for Context<A> where A: RefUnwindSafe,#
impl<A>#
Blanket ImplementationsAny for T where T: 'static + ?Sized,[src]#
impl<T>type_id(&self) -> TypeId[src]#
pub fnGets the TypeId
of self
. Read more
Borrow<T> for T where T: ?Sized,[src]#
impl<T>borrow(&self) -> &T[src]#
pub fnImmutably borrows from an owned value. Read more
BorrowMut<T> for T where T: ?Sized,[src]#
impl<T>borrow_mut(&mut self) -> &mutT[src]#
pub fnMutably borrows from an owned value. Read more
From<T> for T[src]#
impl<T>from(t: T) -> T[src]#
pub fnPerforms the conversion.
Into<U> for T where U: From<T>,[src]#
impl<T, U>into(self) -> U[src]#
pub fnPerforms the conversion.
TryFrom<U> for T where U: Into<T>,[src]#
impl<T, U>Error = Infallible#
typeThe type returned in the event of a conversion error.
try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]#
pub fnPerforms the conversion.
TryInto<U> for T where U: TryFrom<T>,[src]#
impl<T, U>Error = <U as TryFrom<T>>::Error#
typeThe type returned in the event of a conversion error.
try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]#
pub fnPerforms the conversion.