pub struct OledScreen32x128 { /* private fields */ }Implementations§
Source§impl OledScreen32x128
impl OledScreen32x128
pub fn from_path(device_path: &CStr) -> Result<Self, HidError>
pub fn from_id(vid: u16, pid: u16, usage_page: u16) -> Result<Self, HidError>
pub fn from_device(device: impl HidAdapter + 'static) -> Result<Self, HidError>
pub fn draw_image<P: AsRef<Path>>( &mut self, bitmap_file: P, x: usize, y: usize, scale: bool, )
pub fn draw_text( &mut self, text: &str, x: usize, y: usize, size: f32, font_path: Option<&str>, )
pub fn send(&self) -> Result<(), HidError>
pub fn clear(&mut self)
pub fn fill_all(&mut self)
pub fn paint_region( &mut self, min_x: usize, min_y: usize, max_x: usize, max_y: usize, enabled: bool, )
pub fn get_pixel(&self, x: usize, y: usize) -> bool
Sourcepub fn set_pixel(&mut self, x: usize, y: usize, enabled: bool)
pub fn set_pixel(&mut self, x: usize, y: usize, enabled: bool)
Underlying function for drawing to the canvas, if provided coordinates are out of range, this function will fail silently
§Arguments
x- The x coordinate of the pixel to sety- The y coordinate of the pixel to setenabled- Whether to set the pixel to an enabled or disabled state (on/off)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OledScreen32x128
impl !RefUnwindSafe for OledScreen32x128
impl !Send for OledScreen32x128
impl !Sync for OledScreen32x128
impl Unpin for OledScreen32x128
impl !UnwindSafe for OledScreen32x128
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more