pub struct AddressBar {
pub text: String,
pub cursor: usize,
pub focused: bool,
pub selection_start: Option<usize>,
pub suggestions: Vec<String>,
pub showing_suggestions: bool,
}Expand description
Address bar editing state
Fields§
§text: StringCurrent text content
cursor: usizeCursor position (byte offset)
focused: boolWhether the address bar is focused (editing)
selection_start: Option<usize>Selection start (if any)
suggestions: Vec<String>Autocomplete suggestions
showing_suggestions: boolWhether suggestions are visible
Implementations§
Source§impl AddressBar
impl AddressBar
pub fn new() -> Self
Sourcepub fn insert_char(&mut self, ch: char)
pub fn insert_char(&mut self, ch: char)
Insert a character at cursor position
Sourcepub fn move_right(&mut self)
pub fn move_right(&mut self)
Move cursor right
Get the current text, potentially normalizing it as a URL
Trait Implementations§
Source§impl Clone for AddressBar
impl Clone for AddressBar
Source§fn clone(&self) -> AddressBar
fn clone(&self) -> AddressBar
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddressBar
impl Debug for AddressBar
Auto Trait Implementations§
impl Freeze for AddressBar
impl RefUnwindSafe for AddressBar
impl Send for AddressBar
impl Sync for AddressBar
impl Unpin for AddressBar
impl UnwindSafe for AddressBar
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)