pub struct PickerOption {
pub type_name: String,
pub verbose_name: String,
pub icon: Option<String>,
pub group: Option<String>,
pub description: Option<String>,
pub default_value: Option<Value>,
pub collapsed: bool,
pub preview_html: String,
}Expand description
Picker option metadata stamped into the page-edit Tera context.
The block-picker dialog reads from picker_options and filters
by data-allowed at click time.
Fields§
§type_name: String§verbose_name: String§icon: Option<String>§group: Option<String>§description: Option<String>Picker-tile tooltip — Block::description().
default_value: Option<Value>Initial-value blob, serialized JSON of Block::default_value().
The stream editor merges this into the empty-instance dict
when the editor adds a new block.
collapsed: boolWhether new instances start collapsed in the editor —
Block::collapsed(). The stream-block header reads this to
decide initial expand state.
preview_html: StringPre-rendered preview HTML — Block::preview_value() run
through the block’s render template (or
Block::preview_template() when set). The picker tile renders
this inline so editors can see “what does this look like”
before inserting. Empty for blocks that opt out of previews.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PickerOption
impl Freeze for PickerOption
impl RefUnwindSafe for PickerOption
impl Send for PickerOption
impl Sync for PickerOption
impl Unpin for PickerOption
impl UnsafeUnpin for PickerOption
impl UnwindSafe for PickerOption
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> 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> ⓘ
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> ⓘ
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