Rename TextWithHistory to SpanWithHistory

This commit is contained in:
Andras Schmelczer 2025-07-04 03:14:18 +01:00
parent ae5940718e
commit 8bd803c9b2
7 changed files with 100 additions and 30 deletions

View file

@ -9,15 +9,15 @@ use crate::types::history::History;
#[cfg_attr(feature = "wasm", wasm_bindgen)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Clone, PartialEq)]
pub struct TextWithHistory {
pub struct SpanWithHistory {
history: History,
text: String,
}
#[cfg_attr(feature = "wasm", wasm_bindgen)]
impl TextWithHistory {
impl SpanWithHistory {
#[must_use]
pub fn new(history: History, text: String) -> Self { TextWithHistory { history, text } }
pub fn new(history: History, text: String) -> Self { SpanWithHistory { history, text } }
#[must_use]
pub fn history(&self) -> History { self.history }