|
| 1 | +--- |
| 2 | +title: "struct.Webview" |
| 3 | +--- |
| 4 | + |
| 5 | +# Struct [tauri](/docs/api/rust/tauri/index.html)::[Webview](/docs/api/rust/tauri/) |
| 6 | + |
| 7 | + pub struct Webview<'a> { /* fields omitted */ } |
| 8 | + |
| 9 | +## Methods |
| 10 | + |
| 11 | +### `impl<'a> Webview<'a>` |
| 12 | + |
| 13 | +#### `pub fn create(debug: bool, window: Option<&mut Window>) -> Webview` |
| 14 | + |
| 15 | +#### `pub fn run(&mut self)` |
| 16 | + |
| 17 | +#### `pub fn terminate(&mut self)` |
| 18 | + |
| 19 | +#### `pub fn as_mut(&mut self) -> WebviewMut` |
| 20 | + |
| 21 | +#### `pub fn set_title(&mut self, title: &str)` |
| 22 | + |
| 23 | +#### `pub fn set_size(&mut self, width: i32, height: i32, hints: SizeHint)` |
| 24 | + |
| 25 | +#### `pub fn get_window(&self) -> *mutWindow` |
| 26 | + |
| 27 | +#### `pub fn navigate(&mut self, url: &'a str)` |
| 28 | + |
| 29 | +#### `pub fn init(&mut self, js: &str)` |
| 30 | + |
| 31 | +#### `pub fn eval(&mut self, js: &str)` |
| 32 | + |
| 33 | +#### `pub fn dispatch<F>(&mut self, f: F) where F: FnOnce(&mut Webview) + Send + 'static,` |
| 34 | + |
| 35 | +#### `pub fn bind<F>(&mut self, name: &str, f: F) where F: FnMut(&str, &str),` |
| 36 | + |
| 37 | +#### `pub fn return(&self, seq: &str, status: i32, result: &str)` |
| 38 | + |
| 39 | +## Trait Implementations |
| 40 | + |
| 41 | +### `impl<'a> Clone for Webview<'a>` |
| 42 | + |
| 43 | +#### `fn clone(&self) -> Webview<'a>` |
| 44 | + |
| 45 | +Returns a copy of the value. [Read more](https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone) |
| 46 | + |
| 47 | +#### `fn clone_from(&mut self, source: &Self)`1.0.0 |
| 48 | + |
| 49 | +Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from) |
| 50 | + |
| 51 | +### `impl<'a> Drop for Webview<'a>` |
| 52 | + |
| 53 | +#### `fn drop(&mut self)` |
| 54 | + |
| 55 | +Executes the destructor for this type. [Read more](https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop) |
| 56 | + |
| 57 | +## Auto Trait Implementations |
| 58 | + |
| 59 | +### `impl<'a> RefUnwindSafe for Webview<'a>` |
| 60 | + |
| 61 | +### `impl<'a> !Send for Webview<'a>` |
| 62 | + |
| 63 | +### `impl<'a> !Sync for Webview<'a>` |
| 64 | + |
| 65 | +### `impl<'a> Unpin for Webview<'a>` |
| 66 | + |
| 67 | +### `impl<'a> UnwindSafe for Webview<'a>` |
| 68 | + |
| 69 | +## Blanket Implementations |
| 70 | + |
| 71 | +### `impl<T> Any for T where T: 'static + ?Sized,` |
| 72 | + |
| 73 | +#### `fn type_id(&self) -> TypeId` |
| 74 | + |
| 75 | +Gets the `TypeId` of `self`. [Read more](https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id) |
| 76 | + |
| 77 | +### `impl<T> Borrow<T> for T where T: ?Sized,` |
| 78 | + |
| 79 | +#### `fn borrow(&self) -> &T` |
| 80 | + |
| 81 | +Immutably borrows from an owned value. [Read more](https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow) |
| 82 | + |
| 83 | +### `impl<T> BorrowMut<T> for T where T: ?Sized,` |
| 84 | + |
| 85 | +#### `fn borrow_mut(&mut self) -> &mutT` |
| 86 | + |
| 87 | +Mutably borrows from an owned value. [Read more](https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut) |
| 88 | + |
| 89 | +### `impl<T> From<T> for T` |
| 90 | + |
| 91 | +#### `fn from(t: T) -> T` |
| 92 | + |
| 93 | +Performs the conversion. |
| 94 | + |
| 95 | +### `impl<T, U> Into<U> for T where U: From<T>,` |
| 96 | + |
| 97 | +#### `fn into(self) -> U` |
| 98 | + |
| 99 | +Performs the conversion. |
| 100 | + |
| 101 | +### `impl<T> ToOwned for T where T: Clone,` |
| 102 | + |
| 103 | +#### `type Owned = T` |
| 104 | + |
| 105 | +The resulting type after obtaining ownership. |
| 106 | + |
| 107 | +#### `fn to_owned(&self) -> T` |
| 108 | + |
| 109 | +Creates owned data from borrowed data, usually by cloning. [Read more](https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned) |
| 110 | + |
| 111 | +#### `fn clone_into(&self, target: &mutT)` |
| 112 | + |
| 113 | +🔬 This is a nightly-only experimental API. (`toowned_clone_into`) |
| 114 | + |
| 115 | +recently added |
| 116 | + |
| 117 | +Uses borrowed data to replace owned data, usually by cloning. [Read more](https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into) |
| 118 | + |
| 119 | +### `impl<T, U> TryFrom<U> for T where U: Into<T>,` |
| 120 | + |
| 121 | +#### `type Error = Infallible` |
| 122 | + |
| 123 | +The type returned in the event of a conversion error. |
| 124 | + |
| 125 | +#### `fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` |
| 126 | + |
| 127 | +Performs the conversion. |
| 128 | + |
| 129 | +### `impl<T, U> TryInto<U> for T where U: TryFrom<T>,` |
| 130 | + |
| 131 | +#### `type Error = <U as TryFrom<T>>::Error` |
| 132 | + |
| 133 | +The type returned in the event of a conversion error. |
| 134 | + |
| 135 | +#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` |
| 136 | + |
| 137 | +Performs the conversion. |
| 138 | + |
| 139 | +### `impl<V, T> VZip<V> for T where V: MultiLane<T>,` |
| 140 | + |
| 141 | +#### `fn vzip(self) -> V` |
0 commit comments