pub struct LogoSpec {
pub id: String,
pub src: String,
pub width: f32,
pub height: f32,
pub gap: f32,
}Expand description
A header/footer logo: an asset URI plus the rendered display size in PDF points. The renderer decodes the asset once per document and caches the result by URI, so repeating the same logo across pages costs the same as decoding it for one page.
Fields§
§id: StringAsset-library GUID (file stem), same contract as {% media id="…" /%}.
Template-substituted like src. Tried before src; probes
{id}.webp / .png / … then AssetResolver::resolve_id.
src: StringAsset URI — anything the configured asset resolver understands
(file://path, relative path, https://…, asset://…). A bare
GUID with no extension is treated as an id. Cover-page src is
a template ({title}, {coverImage}, …).
width: f32§height: f32§gap: f32Gap between the logo and the slot’s text when both are present. Only effective for the LEFT and RIGHT slots — CENTER slot remains logo-or-text. Defaults to 6 pt.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogoSpec
impl<'de> Deserialize<'de> for LogoSpec
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>,
Auto Trait Implementations§
impl Forget for LogoSpec
impl Freeze for LogoSpec
impl Move for LogoSpec
impl RefUnwindSafe for LogoSpec
impl Send for LogoSpec
impl Sync for LogoSpec
impl Unpin for LogoSpec
impl UnsafeUnpin for LogoSpec
impl UnwindSafe for LogoSpec
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.