-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
no method named capture
found for struct Vec<Screen>
in the current scope
#23
Comments
Chip:M1 |
I don't have the MAC of the M1 chip,and the beta version of the system may not be supported |
Problem on Windows too. Downgraded to 0.3.3 to solve. |
An example of working code: let screens = Screen::all();
let screen = screens.unwrap()[0];
let image = screen.capture().unwrap(); |
readme sample code still has the issue; source example is fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error[E0599]: no method named
capture
found for structVec<Screen>
in the current scope--> src/main.rs:10:28
|
10 | let mut image = screen.capture().unwrap();
| ^^^^^^^ method not found in
Vec<Screen>
error[E0609]: no field
id
on typeVec<Screen>
--> src/main.rs:12:47
|
12 | fs::write(format!("target/{}.png", screen.id.to_string()), &buffer).unwrap();
| ^^ unknown field
error[E0599]: no method named
capture_area
found for structVec<Screen>
in the current scope--> src/main.rs:14:20
|
14 | image = screen.capture_area(300, 300, 300, 300).unwrap();
| ^^^^^^^^^^^^ method not found in
Vec<Screen>
error[E0609]: no field
id
on typeVec<Screen>
--> src/main.rs:16:49
|
16 | fs::write(format!("target/{}-2.png", screen.id.to_string()), &buffer).unwrap();
| ^^ unknown field
Some errors have detailed explanations: E0599, E0609.
For more information about an error, try
rustc --explain E0599
.error: could not compile
screen_shot
due to 4 previous errorsThe text was updated successfully, but these errors were encountered: