pub struct AssetSelection {
pub url: String,
pub alt: Option<String>,
}Expand description
素材选中载荷:on_select 的回传单元。
序列化形状即编辑器桥接契约 [{ "src", "alt?" }](insertImagesFromLibrary),
写字页确认后直接 serde_json::to_string 传给 JS 侧,无需二次映射。
Fields§
§url: String/uploads/<path> URL(序列化为编辑器 Image 节点的 src)。
alt: Option<String>图片替代文本(素材 alt);None 时不序列化,JS 侧等同未提供。
Trait Implementations§
Source§impl Clone for AssetSelection
impl Clone for AssetSelection
Source§fn clone(&self) -> AssetSelection
fn clone(&self) -> AssetSelection
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 AssetSelection
impl Debug for AssetSelection
Source§impl PartialEq for AssetSelection
impl PartialEq for AssetSelection
Source§impl Serialize for AssetSelection
impl Serialize for AssetSelection
impl StructuralPartialEq for AssetSelection
Auto Trait Implementations§
impl Freeze for AssetSelection
impl RefUnwindSafe for AssetSelection
impl Send for AssetSelection
impl Sync for AssetSelection
impl Unpin for AssetSelection
impl UnsafeUnpin for AssetSelection
impl UnwindSafe for AssetSelection
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,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.