[−][src]Struct minimad::Compound
a Compound is a part of a line with a consistent styling. It can be part of word, several words, some inline code, or even the whole line.
Fields
bold: bool
italic: bool
code: bool
Methods
impl<'s> Compound<'s>
[src]
pub fn raw_str(src: &'s str) -> Compound<'s>
[src]
pub fn sub(&self, r_start: usize, r_end: usize) -> Compound<'s>
[src]
return a sub part of the compound, with the same syling r_start is relative, that is 0 is the index of the first char of this compound.
pub fn tail(&self, r_start: usize) -> Compound<'s>
[src]
return a sub part at end of the compound, with the same syling r_start is relative, that is if you give 0 you get a clone of this compound
pub fn raw_part(src: &'s str, start: usize, end: usize) -> Compound<'s>
[src]
pub fn new(
src: &'s str,
start: usize,
end: usize,
bold: bool,
italic: bool,
code: bool
) -> Compound<'s>
[src]
src: &'s str,
start: usize,
end: usize,
bold: bool,
italic: bool,
code: bool
) -> Compound<'s>
pub fn bold(self) -> Compound<'s>
[src]
pub fn italic(self) -> Compound<'s>
[src]
pub fn code(self) -> Compound<'s>
[src]
pub fn set_bold(&mut self, bold: bool)
[src]
pub fn set_italic(&mut self, italic: bool)
[src]
pub fn set_code(&mut self, code: bool)
[src]
pub fn as_str(&self) -> &'s str
[src]
Trait Implementations
impl<'_> PartialEq<Compound<'_>> for Compound<'_>
[src]
fn eq(&self, other: &Compound) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl<'s> Clone for Compound<'s>
[src]
fn clone(&self) -> Compound<'s>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'_> Eq for Compound<'_>
[src]
impl<'_> Debug for Compound<'_>
[src]
impl<'_> Display for Compound<'_>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,