pub struct JsOgImageConfig {
pub width: Option<u32>,
pub height: Option<u32>,
pub background_color: Option<String>,
pub text_color: Option<String>,
pub title_font_size: Option<u32>,
pub description_font_size: Option<u32>,
}Expand description
OG image configuration for JavaScript.
Fields§
§width: Option<u32>Image width in pixels.
height: Option<u32>Image height in pixels.
background_color: Option<String>Background color (hex).
text_color: Option<String>Text color (hex).
title_font_size: Option<u32>Title font size.
description_font_size: Option<u32>Description font size.
Trait Implementations§
Source§impl Clone for JsOgImageConfig
impl Clone for JsOgImageConfig
Source§fn clone(&self) -> JsOgImageConfig
fn clone(&self) -> JsOgImageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for JsOgImageConfig
impl Default for JsOgImageConfig
Source§fn default() -> JsOgImageConfig
fn default() -> JsOgImageConfig
Returns the “default value” for a type. Read more
Source§impl FromNapiValue for JsOgImageConfig
impl FromNapiValue for JsOgImageConfig
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for JsOgImageConfig
impl ToNapiValue for JsOgImageConfig
Source§unsafe fn to_napi_value(
env: napi_env,
val: JsOgImageConfig,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: JsOgImageConfig, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for JsOgImageConfig
impl TypeName for JsOgImageConfig
Source§impl ValidateNapiValue for JsOgImageConfig
impl ValidateNapiValue for JsOgImageConfig
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for JsOgImageConfig
impl RefUnwindSafe for JsOgImageConfig
impl Send for JsOgImageConfig
impl Sync for JsOgImageConfig
impl Unpin for JsOgImageConfig
impl UnwindSafe for JsOgImageConfig
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