pub struct CustomBlockConfig {
pub class_overrides: HashMap<CustomBlockType, String>,
pub title_overrides: HashMap<CustomBlockType, String>,
}Expand description
Configuration for custom block rendering.
Allows overriding the default CSS class and title for each block type, enabling use with CSS frameworks other than Bootstrap.
Fields§
§class_overrides: HashMap<CustomBlockType, String>Override the CSS alert class per block type.
title_overrides: HashMap<CustomBlockType, String>Override the display title per block type.
Implementations§
Source§impl CustomBlockConfig
impl CustomBlockConfig
Sourcepub fn with_class(
self,
block_type: CustomBlockType,
class: impl Into<String>,
) -> Self
pub fn with_class( self, block_type: CustomBlockType, class: impl Into<String>, ) -> Self
Overrides the CSS class for a specific block type.
Sourcepub fn with_title(
self,
block_type: CustomBlockType,
title: impl Into<String>,
) -> Self
pub fn with_title( self, block_type: CustomBlockType, title: impl Into<String>, ) -> Self
Overrides the display title for a specific block type.
Trait Implementations§
Source§impl Clone for CustomBlockConfig
impl Clone for CustomBlockConfig
Source§fn clone(&self) -> CustomBlockConfig
fn clone(&self) -> CustomBlockConfig
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 Debug for CustomBlockConfig
impl Debug for CustomBlockConfig
Source§impl Default for CustomBlockConfig
impl Default for CustomBlockConfig
Source§fn default() -> CustomBlockConfig
fn default() -> CustomBlockConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CustomBlockConfig
impl RefUnwindSafe for CustomBlockConfig
impl Send for CustomBlockConfig
impl Sync for CustomBlockConfig
impl Unpin for CustomBlockConfig
impl UnsafeUnpin for CustomBlockConfig
impl UnwindSafe for CustomBlockConfig
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