pub struct TranslatableLeaf {
pub path: String,
pub widget_kind: WidgetKind,
pub canonical_text: String,
pub block_type: String,
pub block_label: String,
pub field_label: String,
pub block_id: String,
pub depth: usize,
}Expand description
One translatable text leaf discovered in a StreamField tree.
Fields§
§path: StringFull dotted path (incl. the streamfield prefix) — the
cms_translation.field_path key for this leaf.
widget_kind: WidgetKindThe leaf’s widget kind (Text / Textarea / Markdown /
RichText) — drives the editor input type.
canonical_text: StringCanonical (default-locale) text; empty when absent/non-string.
block_type: StringWire type of the owning block (e.g. "callout").
block_label: StringHuman label of the owning block (verbose_name), for UI grouping.
field_label: StringThe BlockField label, for the editor row.
block_id: StringBlock instance UUID that owns this leaf (for grouping rows).
depth: usizeNesting depth: 0 for a leaf in a top-level block, +1 per nested stream/repeat container — used to indent the editor UI.
Trait Implementations§
Source§impl Clone for TranslatableLeaf
impl Clone for TranslatableLeaf
Auto Trait Implementations§
impl Forget for TranslatableLeaf
impl Freeze for TranslatableLeaf
impl RefUnwindSafe for TranslatableLeaf
impl Send for TranslatableLeaf
impl Sync for TranslatableLeaf
impl Unpin for TranslatableLeaf
impl UnsafeUnpin for TranslatableLeaf
impl UnwindSafe for TranslatableLeaf
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreCreates a shared type from an unshared type.