Struct EntryMetadata

Source
pub struct EntryMetadata {
Show 57 fields pub page_title: String, pub page_description: String, pub page_icon: String, pub share_title: String, pub share_description: String, pub share_image: String, pub option_disable_views: bool, pub option_disable_search_engine: bool, pub option_view_password: String, pub option_source_password: String, pub access_recommended_theme: RecommendedTheme, pub access_easy_read: String, pub container_padding: String, pub container_max_width: String, pub container_inner_foreground_color: String, pub container_inner_background: String, pub container_inner_background_color: String, pub container_inner_background_image: String, pub container_inner_background_image_repeat: String, pub container_inner_background_image_position: String, pub container_inner_background_image_size: String, pub container_outer_foreground_color: String, pub container_outer_background: String, pub container_outer_background_color: String, pub container_outer_background_image: String, pub container_outer_background_image_repeat: String, pub container_outer_background_image_position: String, pub container_outer_background_image_size: String, pub container_border: String, pub container_border_image: String, pub container_border_image_slice: String, pub container_border_image_width: String, pub container_border_image_outset: String, pub container_border_image_repeat: String, pub container_border_color: String, pub container_border_width: String, pub container_border_style: String, pub container_border_radius: String, pub container_shadow: String, pub container_flex: bool, pub container_flex_direction: String, pub container_flex_gap: String, pub container_flex_wrap: bool, pub container_flex_align_horizontal: String, pub container_flex_align_vertical: String, pub content_text_shadow: String, pub content_text_shadow_color: String, pub content_text_shadow_offset: String, pub content_text_shadow_blur: String, pub content_font: String, pub content_font_weight: u32, pub content_text_size: String, pub content_text_size_array: Vec<(String, String)>, pub content_text_align: TextAlignment, pub content_text_color: String, pub content_link_color: String, pub content_disable_paragraph_margin: bool,
}

Fields§

§page_title: String

The title of the page.

§page_description: String

The description of the page.

§page_icon: String

The favicon of the page.

§share_title: String

The title of the page shown in external embeds.

§share_description: String

The description of the page shown in external embeds.

§share_image: String

The image shown in external embeds.

§option_disable_views: bool

If views are counted and shown for this entry.

§option_disable_search_engine: bool

Hides this entry for search results.

§option_view_password: String

The password that is required to view this entry.

§option_source_password: String

The password that is required to view the source of the entry.

If no password is provided but a view password IS provided, the view password will be used.

§access_recommended_theme: RecommendedTheme

The theme that is automatically used when this entry is viewed.

§access_easy_read: String

The slug of the easy-to-read (no metadata) version of this entry.

Should not begin with “/”.

§container_padding: String

The padding of the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/padding

§container_max_width: String

The maximum width of the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width

§container_inner_foreground_color: String

The padding of the container. The color of the text in the inner container.

§container_inner_background: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background

§container_inner_background_color: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-color

§container_inner_background_image: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-image

§container_inner_background_image_repeat: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat

§container_inner_background_image_position: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-position

§container_inner_background_image_size: String

The background of the inner container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

§container_outer_foreground_color: String

The color of the text in the outer container.

§container_outer_background: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background

§container_outer_background_color: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-color

§container_outer_background_image: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-image

§container_outer_background_image_repeat: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat

§container_outer_background_image_position: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-position

§container_outer_background_image_size: String

The background of the outer container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

§container_border: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border

§container_border_image: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border-image

§container_border_image_slice: String§container_border_image_width: String§container_border_image_outset: String§container_border_image_repeat: String§container_border_color: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border-color

§container_border_width: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border-width

§container_border_style: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border-style

§container_border_radius: String

The border around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius

§container_shadow: String

The shadow around the container.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow

§container_flex: bool

If the container is a flexbox.

§container_flex_direction: String

The direction of the container’s content (if container has flex enabled).

§container_flex_gap: String

The gap of the container’s content (if container has flex enabled).

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/gap

§container_flex_wrap: bool

If the container’s content wraps (if container has flex enabled).

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap

§container_flex_align_horizontal: String

The alignment of the container’s content horizontally (if container has flex enabled).

Swapped to vertical when direction is column*.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content

§container_flex_align_vertical: String

The alignment of the container’s content vertically (if container has flex enabled).

Swapped to horizontal when direction is column*.

Syntax: https://developer.mozilla.org/en-US/docs/Web/CSS/align-items

§content_text_shadow: String§content_text_shadow_color: String§content_text_shadow_offset: String§content_text_shadow_blur: String§content_font: String

The name of a font from Google Fonts to use.

§content_font_weight: u32

The weight to use for the body text.

§content_text_size: String

The text size of elements (separated by space).

§content_text_size_array: Vec<(String, String)>

The text size of elements by element tag.

§Example

# ...
content_text_size = [["h1", "16px"]]
§content_text_align: TextAlignment

The default text alignment.

§content_text_color: String

The base text color.

§content_link_color: String

The color of links.

§content_disable_paragraph_margin: bool

If paragraph elements have a margin below them.

Implementations§

Source§

impl EntryMetadata

Source

pub fn head_tags(&self) -> String

Source

pub fn css_escape(input: &str) -> String

Source

pub fn css(&self) -> String

Source

pub fn ini_to_toml(input: &str) -> String

Trait Implementations§

Source§

impl Default for EntryMetadata

Source§

fn default() -> EntryMetadata

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for EntryMetadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for EntryMetadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Validate for EntryMetadata

Source§

fn validate(&self) -> Result<(), Errors>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromJsonReader for T
where T: DeserializeOwned + Validate,

§

fn from_json_reader<R>(reader: R) -> Result<T, Error<Error>>
where R: Read,

Convert from json reader. Read more
§

impl<'de, T> FromJsonSlice<'de> for T
where T: Deserialize<'de> + Validate,

§

fn from_json_slice(slice: &'de [u8]) -> Result<T, Error<Error>>

Convert from json slice. Read more
§

impl<'de, T> FromJsonStr<'de> for T
where T: Deserialize<'de> + Validate,

§

fn from_json_str(str: &'de str) -> Result<T, Error<Error>>

Convert from json str. Read more
§

impl<T> FromJsonValue for T
where T: DeserializeOwned + Validate,

§

fn from_json_value(value: Value) -> Result<T, Error<Error>>

§

impl<T> FromTomlReader for T
where T: DeserializeOwned + Validate,

§

fn from_toml_reader<R>(reader: R) -> Result<T, Error<Error>>
where R: Read,

Convert from toml reader. Read more
§

impl<'de, T> FromTomlSlice<'de> for T
where T: Deserialize<'de> + Validate,

§

fn from_toml_slice(slice: &'de [u8]) -> Result<T, Error<Error>>

Convert from toml slice. Read more
§

impl<'de, T> FromTomlStr<'de> for T
where T: Deserialize<'de> + Validate,

§

fn from_toml_str(str: &'de str) -> Result<T, Error<Error>>

Convert from toml str. Read more
§

impl<T> FromTomlValue for T
where T: DeserializeOwned + Validate,

§

fn from_toml_value(value: Value) -> Result<T, Error<Error>>

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToJsonString for T
where T: Serialize + Validate,

§

fn to_json_string(&self) -> Result<String, Error>

Convert to json string. Read more
§

fn to_json_string_pretty(&self) -> Result<String, Error>

Convert to json pretty string. Read more
§

impl<T> ToJsonValue for T
where T: Serialize + Validate,

§

fn to_json_value(&self) -> Result<Value, Error>

Convert to json string. Read more
§

impl<T> ToJsonWriter for T
where T: Serialize + Validate,

§

fn to_json_writer<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to json writer. Read more
§

fn to_json_writer_pretty<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to pretty json writer. Read more
§

impl<T> ToTomlString for T
where T: Serialize + Validate,

§

fn to_toml_string(&self) -> Result<String, Error>

Convert to toml string. Read more
§

fn to_toml_string_pretty(&self) -> Result<String, Error>

Convert to toml pretty string. Read more
§

impl<T> ToTomlValue for T
where T: Serialize + Validate,

§

fn to_toml_value(&self) -> Result<Value, Error>

Convert to toml string. Read more
§

impl<T> ToTomlWriter for T
where T: Serialize + Validate,

§

fn to_toml_writer<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to toml writer. Read more
§

fn to_toml_writer_pretty<W>(&self, writer: W) -> Result<(), Error>
where W: Write,

Convert to pretty toml writer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,