pub struct RenderRequestBuilder { /* private fields */ }Expand description
Builder for a validated one-format render request.
Implementations§
Source§impl RenderRequestBuilder
impl RenderRequestBuilder
Sourcepub fn include_background(self, include: bool) -> Self
pub fn include_background(self, include: bool) -> Self
Selects whether the scene background is included.
Sourcepub fn sizing(self, sizing: Sizing) -> Self
pub fn sizing(self, sizing: Sizing) -> Self
Selects explicit scale or downscale-only maximum-dimension sizing.
Sourcepub fn color_mode(self, color_mode: ColorMode) -> Self
pub fn color_mode(self, color_mode: ColorMode) -> Self
Selects light or dark color interpretation.
Sourcepub fn frame_options(self, options: FrameOptions) -> Self
pub fn frame_options(self, options: FrameOptions) -> Self
Replaces all frame controls.
Sourcepub fn metadata_options(self, options: MetadataOptions) -> Self
pub fn metadata_options(self, options: MetadataOptions) -> Self
Replaces all optional artifact metadata controls.
Sourcepub fn supplemental_assets(self, assets: SupplementalAssets) -> Self
pub fn supplemental_assets(self, assets: SupplementalAssets) -> Self
Replaces all owned supplemental assets.
Sourcepub fn resource_limits(self, limits: ResourceLimits) -> Self
pub fn resource_limits(self, limits: ResourceLimits) -> Self
Replaces the validated semantic resource ceilings.
Sourcepub fn pdf_options(self, options: PdfOptions) -> Self
pub fn pdf_options(self, options: PdfOptions) -> Self
Replaces PDF-specific controls.
Sourcepub fn build(self) -> Result<RenderRequest, RequestError>
pub fn build(self) -> Result<RenderRequest, RequestError>
Validates and constructs the request.
§Errors
Returns a RequestError when the output format’s Cargo feature is
not enabled in this build (request.format-unavailable; see the
crate documentation), the padding is negative
or not finite (request.invalid-padding), the Sizing scale or
maximum dimension is not finite and positive (request.invalid-scale,
request.invalid-max-dimension), or PdfOptions were supplied for
another output format (request.incompatible-format-options).
Trait Implementations§
Source§impl Clone for RenderRequestBuilder
impl Clone for RenderRequestBuilder
Auto Trait Implementations§
impl Freeze for RenderRequestBuilder
impl RefUnwindSafe for RenderRequestBuilder
impl Send for RenderRequestBuilder
impl Sync for RenderRequestBuilder
impl Unpin for RenderRequestBuilder
impl UnsafeUnpin for RenderRequestBuilder
impl UnwindSafe for RenderRequestBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.