pub struct Format { /* private fields */ }Expand description
One single-image device and its call-local options. An omitted PNG size is resolved by the actual receiver at publication time.
Implementations§
Source§impl Format
impl Format
Sourcepub fn from_path(path: impl AsRef<Path>) -> Result<Self>
pub fn from_path(path: impl AsRef<Path>) -> Result<Self>
Infer a currently supported single-image encoder from a filename’s conventional suffix, independently of the actual output destination.
Sourcepub const fn png() -> Self
pub const fn png() -> Self
PNG with balanced compression and receiver-dependent default sizing.
Sourcepub const fn preserve_text(self, preserve: bool) -> Self
pub const fn preserve_text(self, preserve: bool) -> Self
Select actual retained text instead of frozen glyph outlines in SVG.
Sourcepub const fn sizing(self, sizing: PngSizing) -> Self
pub const fn sizing(self, sizing: PngSizing) -> Self
Explicit PNG sampling, independent of the receiver’s default.
Sourcepub const fn compression(self, compression: PngCompression) -> Self
pub const fn compression(self, compression: PngCompression) -> Self
Set PNG compression independently of sampling.
Sourcepub fn region(self, region: ExportRegion) -> Self
pub fn region(self, region: ExportRegion) -> Self
Select the publication-only output frame.
Sourcepub const fn transparent(self, transparent: bool) -> Self
pub const fn transparent(self, transparent: bool) -> Self
Remove semantically identifiable native structural paper.
Sourcepub const fn matte(self, matte: OpaqueColor) -> Self
pub const fn matte(self, matte: OpaqueColor) -> Self
Place the completed picture over an opaque sRGB background.
Sourcepub const fn suffix(&self) -> &'static str
pub const fn suffix(&self) -> &'static str
Conventional extension of the selected encoder, including its dot.
Trait Implementations§
Source§impl From<PngOptions> for Format
impl From<PngOptions> for Format
Source§fn from(options: PngOptions) -> Self
fn from(options: PngOptions) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Forget for Format
impl Freeze for Formatwhere
*const u8 is !null: Freeze,
PhantomData<PanelStep>: Freeze,
*const ArcInner<SpacingPayload> is !null: Freeze,
PhantomData<ArcInner<SpacingPayload>>: Freeze,
PhantomData<RectRef>: Freeze,
PhantomData<PaintBatchRef>: Freeze,
impl Move for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Formatwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<PanelStep>: UnsafeUnpin,
*const ArcInner<SpacingPayload> is !null: UnsafeUnpin,
PhantomData<ArcInner<SpacingPayload>>: UnsafeUnpin,
PhantomData<RectRef>: UnsafeUnpin,
PhantomData<PaintBatchRef>: UnsafeUnpin,
impl UnwindSafe for Formatwhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<SpacingPayload>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.