pub struct ConfigBuilder { /* private fields */ }
Expand description
Builder to conveniently create a miniview configuration
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Self
pub fn from_path<P: AsRef<Path>>(path: P) -> Self
Creates a builder from the provided path
Path should point to an image on the filesystem.
Sourcepub fn source(self, value: Source) -> Self
pub fn source(self, value: Source) -> Self
Source of the image to be shown by the window. Can be a path or raw bytes imported from the stdin pipe
Sourcepub fn set_fullscreen(self, value: bool) -> Self
pub fn set_fullscreen(self, value: bool) -> Self
Activates fullscreen mode
Sourcepub fn allow_resizable_window(self, value: bool) -> Self
pub fn allow_resizable_window(self, value: bool) -> Self
Allow window resizing
Note: Upon resizing of the window, the image itself is not resized Note: Fullscreen mode implies window resizing
Sourcepub fn set_lazy_window(self, value: bool) -> Self
pub fn set_lazy_window(self, value: bool) -> Self
Lazily update the window
Warning: if the window uses lazy updates, events may not work as expected (input events are is required to poll successive window events in lazy window mode).
Sourcepub fn window_name(self, value: &'static str) -> Self
pub fn window_name(self, value: &'static str) -> Self
Title of the window; useful when trying to capture the window from another program.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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