[−][src]Struct sauron::Window
Provides access to the Browser window
Implementations
impl Window
[src]
pub fn add_event_listeners<APP, MSG>(
event_listeners: Vec<Attribute<&'static str, &'static str, AttributeValue, Event, MSG>, Global>
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
[src]
event_listeners: Vec<Attribute<&'static str, &'static str, AttributeValue, Event, MSG>, Global>
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Component<MSG> + 'static,
attach an event listender to the window
pub fn set_title(title: &str)
[src]
set the title of the document
pub fn on_resize<F, APP, MSG>(cb: F) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
F: Fn(i32, i32) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
[src]
MSG: 'static,
F: Fn(i32, i32) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
Creates a Cmd in which the MSG will be emitted whenever the browser is resized
pub fn on_hashchange<F, APP, MSG>(cb: F) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
F: Fn(String) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
[src]
MSG: 'static,
F: Fn(String) -> MSG + Clone + 'static,
APP: Component<MSG> + 'static,
attached a callback and will be triggered when the hash portion of the window location url is changed
pub fn get_size() -> (i32, i32)
[src]
return the size of the browser at this moment
pub fn get_hash() -> String
[src]
return the hash part of the browser current url location
The hash part are the text right after the #
sign
pub fn scroll_to_top()
[src]
scroll the browser to the top of the document
pub fn set_location_hash(hash: &str)
[src]
set the browser location hash
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Window
[src]
impl Send for Window
[src]
impl Sync for Window
[src]
impl Unpin for Window
[src]
impl UnwindSafe for Window
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,