pub trait ImagePicker {
// Required method
fn pick_image(
&self,
source: ImageSource,
) -> PickerFuture<Result<Option<Vec<u8>>, ImagePickerError>>;
}Expand description
Picks or captures a single image and returns its encoded bytes.
Required Methods§
Sourcefn pick_image(
&self,
source: ImageSource,
) -> PickerFuture<Result<Option<Vec<u8>>, ImagePickerError>>
fn pick_image( &self, source: ImageSource, ) -> PickerFuture<Result<Option<Vec<u8>>, ImagePickerError>>
Present a picker/camera for source and resolve to the chosen image’s
encoded bytes, or None if the user cancelled.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".