pub struct StyledText {
pub style: TextStyle,
pub text: String,
pub placement: Option<String>,
pub offset_x: Option<f64>,
pub offset_y: Option<f64>,
pub relative_x: Option<f64>,
pub relative_y: Option<f64>,
}Expand description
A typed score text annotation. The text itself is kept separate from its presentation role so consumers do not need to infer semantics from prose.
Fields§
§style: TextStyle§text: String§placement: Option<String>Optional vertical placement hint from interchange formats.
offset_x: Option<f64>MusicXML default horizontal offset in tenths, when attached to a direction text.
offset_y: Option<f64>MusicXML default vertical offset in tenths, when attached to a direction text.
relative_x: Option<f64>MusicXML relative horizontal offset in tenths, retaining its relative-coordinate meaning.
relative_y: Option<f64>MusicXML relative vertical offset in tenths, retaining its relative-coordinate meaning.
Trait Implementations§
Source§impl Clone for StyledText
impl Clone for StyledText
Source§impl Debug for StyledText
impl Debug for StyledText
Source§impl<'de> Deserialize<'de> for StyledText
impl<'de> Deserialize<'de> for StyledText
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StyledText
impl PartialEq for StyledText
Source§impl Serialize for StyledText
impl Serialize for StyledText
impl StructuralPartialEq for StyledText
Auto Trait Implementations§
impl Freeze for StyledText
impl RefUnwindSafe for StyledText
impl Send for StyledText
impl Sync for StyledText
impl Unpin for StyledText
impl UnsafeUnpin for StyledText
impl UnwindSafe for StyledText
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