Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues related to tauri-plugin-window (desktop-commands.rs) #36

Open
ReactiveFilos opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@ReactiveFilos
Copy link

I'm getting these errors:

error[E0432]: unresolved import tauri::Icon
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:10:5
|
10 | Icon,
| ^^^^ no Icon in the root
|
= help: consider importing this variant instead:
tauri::menu::MenuItemKind::Icon

error[E0432]: unresolved import tauri::webview::WindowBuilder
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:24:5
|
24 | use tauri::webview::WindowBuilder;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no WindowBuilder in webview

error[E0603]: struct Image is private
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:23:20
|
23 | use tauri::window::Image;
| ^^^^^ private struct
|
note: the struct Image is defined here
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-2.2.0\src\window\mod.rs:36:3
|
36 | image::Image,
| ^^^^^^^^^^^^
help: import Image directly
|
23 | use tauri::image::Image;
| ~~~~~~~~~~~~~~~~~~~

error[E0599]: no method named print found for struct tauri::Window in the current scope
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:163:9
|
163 | setter!(print);
| ^^^^^ method not found in Window<R>

error[E0277]: the trait bound Image<'_>: From<IconDto> is not satisfied
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:171:47
|
171 | get_window(window, label)?.set_icon(value.into()).map_err(Into::into)
| ^^^^ the trait From<IconDto> is not implemented for Image<'_>, which is required by IconDto: Into<_>
|
= note: required for IconDto to implement Into<Image<'_>>

error[E0599]: no method named has_devtools found for struct tauri::Window in the current scope
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:207:15
|
207 | if window.has_devtools()? {
| ^^^^^^^^^^^^ method not found in Window<R>

error[E0599]: no method named hide_devtools found for struct tauri::Window in the current scope
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:208:16
|
208 | window.hide_devtools()?;
| ^^^^^^^^^^^^^ method not found in Window<R>

error[E0599]: no method named show_devtools found for struct tauri::Window in the current scope
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:210:16
|
210 | window.show_devtools()?;
| ^^^^^^^^^^^^^ method not found in Window<R>

error[E0308]: mismatched types
--> C:[...].cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-window-2.0.0-alpha.2\src\desktop_commands.rs:76:37
|
74 | fn get_window<R: Runtime>(window: Window, label: Option) -> Result<Window> {
| ----------------- expected std::result::Result<tauri::Window<R>, desktop_commands::Error> because of return type
75 | match label {
76 | Some(l) if !l.is_empty() => window.get_webview_window(&l).ok_or(Error::WindowNotFound),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected Result<Window<R>, Error>, found Result<WebviewWindow<R>, Error>
|
= note: expected enum std::result::Result<tauri::Window<R>, _>
found enum std::result::Result<tauri::WebviewWindow<R>, _>

Some errors have detailed explanations: E0277, E0308, E0432, E0599, E0603.
For more information about an error, try rustc --explain E0277.
error: could not compile tauri-plugin-window (lib) due to 9 previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant