pub struct StyledString {
pub s: String,
pub style: Style,
pub link: Option<String>,
}Expand description
Fields§
§s: StringThe annotated string.
style: StyleThe style annotation.
link: Option<String>The link annotation.
Implementations§
Trait Implementations§
Source§impl Clone for StyledString
impl Clone for StyledString
Source§fn clone(&self) -> StyledString
fn clone(&self) -> StyledString
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 StyledString
impl Debug for StyledString
Source§impl Default for StyledString
impl Default for StyledString
Source§fn default() -> StyledString
fn default() -> StyledString
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a String> for StyledString
impl<'a> From<&'a String> for StyledString
Source§fn from(s: &'a String) -> StyledString
fn from(s: &'a String) -> StyledString
Converts to this type from the input type.
Source§impl<'s> From<&'s StyledString> for StyledCow<'s>
impl<'s> From<&'s StyledString> for StyledCow<'s>
Source§fn from(s: &'s StyledString) -> StyledCow<'s>
fn from(s: &'s StyledString) -> StyledCow<'s>
Converts to this type from the input type.
Source§impl<'s> From<&'s StyledString> for StyledStr<'s>
impl<'s> From<&'s StyledString> for StyledStr<'s>
Source§fn from(s: &'s StyledString) -> StyledStr<'s>
fn from(s: &'s StyledString) -> StyledStr<'s>
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for StyledString
impl<'a> From<&'a str> for StyledString
Source§fn from(s: &'a str) -> StyledString
fn from(s: &'a str) -> StyledString
Converts to this type from the input type.
Source§impl From<String> for StyledString
impl From<String> for StyledString
Source§fn from(s: String) -> StyledString
fn from(s: String) -> StyledString
Converts to this type from the input type.
Source§impl<'s> From<StyledString> for StyledCow<'s>
impl<'s> From<StyledString> for StyledCow<'s>
Source§fn from(s: StyledString) -> StyledCow<'s>
fn from(s: StyledString) -> StyledCow<'s>
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StyledString
impl RefUnwindSafe for StyledString
impl Send for StyledString
impl Sync for StyledString
impl Unpin for StyledString
impl UnwindSafe for StyledString
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,
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.