pub struct MiniAppSystemInfo { /* private fields */ }Expand description
Normalized host device, window, status bar, safe-area, and capsule metrics across all Mini-Program vendors.
Implementations§
Source§impl MiniAppSystemInfo
Preset builders for MiniAppSystemInfo.
impl MiniAppSystemInfo
Preset builders for MiniAppSystemInfo.
Sourcepub fn for_vendor(vendor: MiniAppVendor) -> Self
pub fn for_vendor(vendor: MiniAppVendor) -> Self
Source§impl MiniAppSystemInfo
impl MiniAppSystemInfo
pub fn get_vendor(&self) -> MiniAppVendor
pub fn get_mut_vendor(&mut self) -> &mut MiniAppVendor
pub fn set_vendor(&mut self, val: MiniAppVendor) -> &mut Self
pub fn get_window_width(&self) -> u32
pub fn get_mut_window_width(&mut self) -> &mut u32
pub fn set_window_width(&mut self, val: u32) -> &mut Self
pub fn get_window_height(&self) -> u32
pub fn get_mut_window_height(&mut self) -> &mut u32
pub fn set_window_height(&mut self, val: u32) -> &mut Self
pub fn get_pixel_ratio(&self) -> f32
pub fn get_mut_pixel_ratio(&mut self) -> &mut f32
pub fn set_pixel_ratio(&mut self, val: f32) -> &mut Self
pub fn get_status_bar_height(&self) -> f32
pub fn get_mut_status_bar_height(&mut self) -> &mut f32
pub fn set_status_bar_height(&mut self, val: f32) -> &mut Self
pub fn get_safe_area(&self) -> SafeAreaInsets
pub fn get_mut_safe_area(&mut self) -> &mut SafeAreaInsets
pub fn set_safe_area(&mut self, val: SafeAreaInsets) -> &mut Self
pub fn get_capsule(&self) -> MiniAppCapsuleRect
pub fn get_mut_capsule(&mut self) -> &mut MiniAppCapsuleRect
pub fn set_capsule(&mut self, val: MiniAppCapsuleRect) -> &mut Self
pub fn get_theme(&self) -> ThemeMode
pub fn get_mut_theme(&mut self) -> &mut ThemeMode
pub fn set_theme(&mut self, val: ThemeMode) -> &mut Self
pub fn get_language(&self) -> &String
pub fn get_mut_language(&mut self) -> &mut String
pub fn set_language(&mut self, val: String) -> &mut Self
pub fn get_canvas_mode(&self) -> MiniAppCanvasMode
pub fn get_mut_canvas_mode(&mut self) -> &mut MiniAppCanvasMode
pub fn set_canvas_mode(&mut self, val: MiniAppCanvasMode) -> &mut Self
Trait Implementations§
Source§impl Clone for MiniAppSystemInfo
impl Clone for MiniAppSystemInfo
Source§impl Debug for MiniAppSystemInfo
impl Debug for MiniAppSystemInfo
Source§impl Default for MiniAppSystemInfo
Default MiniAppSystemInfo modeling a modern 390x844@3x smartphone Mini-Program container with floating capsule.
impl Default for MiniAppSystemInfo
Default MiniAppSystemInfo modeling a modern 390x844@3x smartphone Mini-Program container with floating capsule.
Source§impl PartialEq for MiniAppSystemInfo
impl PartialEq for MiniAppSystemInfo
impl StructuralPartialEq for MiniAppSystemInfo
Auto Trait Implementations§
impl Forget for MiniAppSystemInfo
impl Freeze for MiniAppSystemInfo
impl Move for MiniAppSystemInfo
impl RefUnwindSafe for MiniAppSystemInfo
impl Send for MiniAppSystemInfowhere
RawVecInner: Send,
impl Sync for MiniAppSystemInfowhere
RawVecInner: Sync,
impl Unpin for MiniAppSystemInfo
impl UnsafeUnpin for MiniAppSystemInfo
impl UnwindSafe for MiniAppSystemInfowhere
RawVecInner: UnwindSafe,
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