pub enum AlignSide {
Left,
Right,
}Expand description
Image alignment for editorial runaround layout. Mirrors WordPress’s
alignleft / alignright block-editor convention; the moss CSS class
is moss-align-left / moss-align-right. Float behavior plus mobile
collapse (≤48rem) live in src-tauri/src/assets/css/site.css.
Hyphenated align-left is the canonical pipe-keyword form; unhyphenated
alignleft (matching the WP class name) is a forgiveness alias.
Bare left / right are also accepted, because Stage 1 emits them as
the value of an explicit align= key in TitleParams (e.g. align=left),
where ambiguity with Position’s left / right does not arise.
Note: in parse_media_attrs’s space-separated keyword parser, bare
left / right still match Position::from_keyword FIRST and never
reach this function, so the disambiguation rule for the pipe-keyword
layer is preserved.
Variants§
Implementations§
Source§impl AlignSide
impl AlignSide
Sourcepub fn from_keyword(s: &str) -> Option<Self>
pub fn from_keyword(s: &str) -> Option<Self>
Parse from a keyword string (case-insensitive).
Accepts:
- hyphenated
align-left/align-right(canonical pipe keyword) - concatenated
alignleft/alignright(WordPress class alias) - bare
left/right(Stage 1 TitleParamsalign=value)
Trait Implementations§
impl Copy for AlignSide
impl Eq for AlignSide
impl StructuralPartialEq for AlignSide
Auto Trait Implementations§
impl Freeze for AlignSide
impl RefUnwindSafe for AlignSide
impl Send for AlignSide
impl Sync for AlignSide
impl Unpin for AlignSide
impl UnsafeUnpin for AlignSide
impl UnwindSafe for AlignSide
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.