pub struct PermissionsPrompt {
pub origin: String,
pub capabilities: Vec<String>,
pub queue_len: u32,
}Expand description
Render input for PermissionsPrompt::paint_at. Mirrors the data the
buffr permissions queue exposes; Capability is decoupled from the
buffr-permissions crate to keep buffr-ui from picking up a
rusqlite dep.
Fields§
§origin: StringDisplay origin — typically the requesting URL’s origin (scheme + host + port). Truncated from the right at paint time when too long for the content width.
capabilities: Vec<String>Human-readable capability labels (e.g. “camera”, “microphone”).
The widget joins them with , for the action line.
queue_len: u32How many more requests are queued behind this one. 0 hides the
(N more pending) indicator.
Implementations§
Source§impl PermissionsPrompt
impl PermissionsPrompt
Sourcepub fn paint_at(
&self,
buffer: &mut [u32],
width: usize,
height: usize,
content_x: u32,
content_y: u32,
content_w: u32,
) -> u32
pub fn paint_at( &self, buffer: &mut [u32], width: usize, height: usize, content_x: u32, content_y: u32, content_w: u32, ) -> u32
Paint the prompt content into the inner popup rect
(content_x, content_y, content_w, PERMISSIONS_PROMPT_HEIGHT).
The caller is responsible for drawing the popup border and
background before calling this. Returns PERMISSIONS_PROMPT_HEIGHT.
Trait Implementations§
Source§impl Clone for PermissionsPrompt
impl Clone for PermissionsPrompt
Source§fn clone(&self) -> PermissionsPrompt
fn clone(&self) -> PermissionsPrompt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PermissionsPrompt
impl Debug for PermissionsPrompt
Source§impl PartialEq for PermissionsPrompt
impl PartialEq for PermissionsPrompt
impl Eq for PermissionsPrompt
impl StructuralPartialEq for PermissionsPrompt
Auto Trait Implementations§
impl Freeze for PermissionsPrompt
impl RefUnwindSafe for PermissionsPrompt
impl Send for PermissionsPrompt
impl Sync for PermissionsPrompt
impl Unpin for PermissionsPrompt
impl UnsafeUnpin for PermissionsPrompt
impl UnwindSafe for PermissionsPrompt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 more