pub struct TextItem {
pub text: String,
pub text_type: TextType,
pub node: Handle,
pub tag_name: String,
}
Expand description
文本项结构体
Fields§
§text: String
文本内容
text_type: TextType
文本类型
node: Handle
对应的DOM节点
tag_name: String
标签名称
Implementations§
Source§impl TextItem
impl TextItem
Sourcepub fn apply_translation(&self, translation: &str) -> TranslationResult<()>
pub fn apply_translation(&self, translation: &str) -> TranslationResult<()>
应用翻译到DOM节点
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextItem
impl !RefUnwindSafe for TextItem
impl !Send for TextItem
impl !Sync for TextItem
impl Unpin for TextItem
impl !UnwindSafe for TextItem
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