#[non_exhaustive]pub struct OneBitSettings {
pub dither: Dither,
pub alpha_cut: u8,
pub invert: bool,
}Expand description
A picture’s onebit import settings section (ADR-0057): how it is
made one-bit. Every field may be left out: (onebit: ()) is the
default, Atkinson with a cut at 128.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dither: DitherHow its greys become black and white.
alpha_cut: u8The alpha below which a pixel is see-through (0 for none).
invert: boolWhether its brightness is turned over first, so black becomes white.
Implementations§
Trait Implementations§
Source§impl Clone for OneBitSettings
impl Clone for OneBitSettings
Source§fn clone(&self) -> OneBitSettings
fn clone(&self) -> OneBitSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OneBitSettings
Source§impl Debug for OneBitSettings
impl Debug for OneBitSettings
Source§impl Default for OneBitSettings
impl Default for OneBitSettings
Source§impl<'de> Deserialize<'de> for OneBitSettingswhere
OneBitSettings: Default,
impl<'de> Deserialize<'de> for OneBitSettingswhere
OneBitSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OneBitSettings
Source§impl Hash for OneBitSettings
impl Hash for OneBitSettings
Source§impl ImportSettings for OneBitSettings
impl ImportSettings for OneBitSettings
Source§impl PartialEq for OneBitSettings
impl PartialEq for OneBitSettings
impl StructuralPartialEq for OneBitSettings
Auto Trait Implementations§
impl Freeze for OneBitSettings
impl RefUnwindSafe for OneBitSettings
impl Send for OneBitSettings
impl Sync for OneBitSettings
impl Unpin for OneBitSettings
impl UnsafeUnpin for OneBitSettings
impl UnwindSafe for OneBitSettings
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