pub enum CustomBlockType {
Note,
Warning,
Tip,
Info,
Important,
Caution,
}Expand description
Represents different types of custom blocks.
Variants§
Note
A note block.
Warning
A warning block.
Tip
A tip block.
Info
An info block.
Important
An important block.
Caution
A caution block.
Implementations§
Source§impl CustomBlockType
impl CustomBlockType
Sourcepub fn default_alert_class(&self) -> &'static str
pub fn default_alert_class(&self) -> &'static str
Returns the default Bootstrap alert class.
Sourcepub fn default_title(&self) -> &'static str
pub fn default_title(&self) -> &'static str
Returns the default human-readable title.
Sourcepub fn get_alert_class(&self) -> &'static str
pub fn get_alert_class(&self) -> &'static str
Returns the default Bootstrap alert class for this block type.
Sourcepub fn alert_class_with<'a>(&self, config: &'a CustomBlockConfig) -> &'a str
pub fn alert_class_with<'a>(&self, config: &'a CustomBlockConfig) -> &'a str
Returns the alert class, respecting config overrides.
Sourcepub fn title_with<'a>(&self, config: &'a CustomBlockConfig) -> &'a str
pub fn title_with<'a>(&self, config: &'a CustomBlockConfig) -> &'a str
Returns the title, respecting config overrides.
Trait Implementations§
Source§impl Clone for CustomBlockType
impl Clone for CustomBlockType
Source§fn clone(&self) -> CustomBlockType
fn clone(&self) -> CustomBlockType
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 CustomBlockType
impl Debug for CustomBlockType
Source§impl FromStr for CustomBlockType
impl FromStr for CustomBlockType
Source§impl Hash for CustomBlockType
impl Hash for CustomBlockType
Source§impl PartialEq for CustomBlockType
impl PartialEq for CustomBlockType
impl Copy for CustomBlockType
impl Eq for CustomBlockType
impl StructuralPartialEq for CustomBlockType
Auto Trait Implementations§
impl Freeze for CustomBlockType
impl RefUnwindSafe for CustomBlockType
impl Send for CustomBlockType
impl Sync for CustomBlockType
impl Unpin for CustomBlockType
impl UnsafeUnpin for CustomBlockType
impl UnwindSafe for CustomBlockType
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