pub struct Location { /* private fields */ }
Expand description
Representation of the location (URL) of the object it is linked to.
Implementations§
Source§impl Location
impl Location
Sourcepub fn assign(&self, url: &str) -> Result<()>
pub fn assign(&self, url: &str) -> Result<()>
Loads the resource at the URL provided in parameter.
§Errors
An error may be returned if the url is malformed.
Sourcepub fn replace(&self, url: &str) -> Result<()>
pub fn replace(&self, url: &str) -> Result<()>
Replaces the current resource with the one at the provided URL.
The difference from the assign
method is that after using replace
the
current page will not be saved in session History
, meaning the user
won’t be able to use the back button to navigate to it
§Errors
An error may be returned if the url is malformed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl !Send for Location
impl !Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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