pub struct RenditionLayout {Show 14 fields
pub layout_mode: LayoutMode,
pub flow_mode: FlowMode,
pub spread_mode: SpreadMode,
pub writing_mode: WritingMode,
pub theme: Theme,
pub font_family: String,
pub font_size_px: u32,
pub line_height: f32,
pub margin_px: u32,
pub allow_scripted_content: bool,
pub viewport_config: ViewportManagerConfig,
pub asset_delivery: AssetDeliveryStrategy,
pub custom_font_family: Option<String>,
pub custom_font_url: Option<String>,
}Fields§
§layout_mode: LayoutMode§flow_mode: FlowMode§spread_mode: SpreadMode§writing_mode: WritingMode§theme: Theme§font_family: String§font_size_px: u32§line_height: f32§margin_px: u32§allow_scripted_content: bool§viewport_config: ViewportManagerConfig§asset_delivery: AssetDeliveryStrategy§custom_font_family: Option<String>§custom_font_url: Option<String>Implementations§
Source§impl RenditionLayout
impl RenditionLayout
Sourcepub fn set_custom_font(&mut self, font_family: &str, font_url_or_b64: &str)
pub fn set_custom_font(&mut self, font_family: &str, font_url_or_b64: &str)
Inject custom reader font family and font URL (F5 Fix) with CSS injection sanitization.
Sourcepub fn to_css_override(&self) -> String
pub fn to_css_override(&self) -> String
Generate dynamic CSS rules to inject into section HTML.
Trait Implementations§
Source§impl Clone for RenditionLayout
impl Clone for RenditionLayout
Source§fn clone(&self) -> RenditionLayout
fn clone(&self) -> RenditionLayout
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 moreSource§impl Debug for RenditionLayout
impl Debug for RenditionLayout
Source§impl Default for RenditionLayout
impl Default for RenditionLayout
Source§impl<'de> Deserialize<'de> for RenditionLayout
impl<'de> Deserialize<'de> for RenditionLayout
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
Auto Trait Implementations§
impl Freeze for RenditionLayout
impl RefUnwindSafe for RenditionLayout
impl Send for RenditionLayout
impl Sync for RenditionLayout
impl Unpin for RenditionLayout
impl UnsafeUnpin for RenditionLayout
impl UnwindSafe for RenditionLayout
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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