Struct tpnote_lib::content::ContentRef
source · pub struct ContentRef<'a> {
pub header: &'a str,
pub body: &'a str,
}Expand description
Pointers belonging to the self referential struct Content.
Fields§
§header: &'a strSkip optional BOM and "---" in s until next "---".
When no --- is found, this is empty.
header is always trimmed.
body: &'a strSkip optional BOM and optional header and keep the rest.
Trait Implementations§
source§impl<'a> Debug for ContentRef<'a>
impl<'a> Debug for ContentRef<'a>
source§impl<'a> Display for ContentRef<'a>
impl<'a> Display for ContentRef<'a>
Concatenates the header and the body and prints the content. This function is expensive as it involves copying the whole content.
source§impl<'a> PartialEq<ContentRef<'a>> for ContentRef<'a>
impl<'a> PartialEq<ContentRef<'a>> for ContentRef<'a>
source§fn eq(&self, other: &ContentRef<'a>) -> bool
fn eq(&self, other: &ContentRef<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<'a> Eq for ContentRef<'a>
impl<'a> StructuralEq for ContentRef<'a>
impl<'a> StructuralPartialEq for ContentRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ContentRef<'a>
impl<'a> Send for ContentRef<'a>
impl<'a> Sync for ContentRef<'a>
impl<'a> Unpin for ContentRef<'a>
impl<'a> UnwindSafe for ContentRef<'a>
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere T: Display,
§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more