pub struct Greetings<'a, B> {
pub text: Option<&'a str>,
pub slice: &'a [B],
}
Expand description
Welcome to GATs!
Fields§
§text: Option<&'a str>
Text that decorates the data.
slice: &'a [B]
The data itself.
Trait Implementations§
Source§impl<'a, B: Ord + Clone> MyTrait<'a> for Greetings<'a, B>
impl<'a, B: Ord + Clone> MyTrait<'a> for Greetings<'a, B>
Source§fn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Conversion from an instance of this type to the owned type.
fn clone_onto(&self, other: &mut Self::Owned)
Source§fn compare(&self, other: &Self::Owned) -> Ordering
fn compare(&self, other: &Self::Owned) -> Ordering
Indicates that
self <= other
; used for sorting.Source§fn less_equals(&self, other: &Self::Owned) -> bool
fn less_equals(&self, other: &Self::Owned) -> bool
self <= other
Source§impl<'a, B: Ord> Ord for Greetings<'a, B>
impl<'a, B: Ord> Ord for Greetings<'a, B>
Source§impl<'a, 'b, B: Ord> PartialOrd<Greetings<'a, B>> for Greetings<'b, B>
impl<'a, 'b, B: Ord> PartialOrd<Greetings<'a, B>> for Greetings<'b, B>
impl<'a, B> Copy for Greetings<'a, B>
impl<'a, B: Ord> Eq for Greetings<'a, B>
Auto Trait Implementations§
impl<'a, B> Freeze for Greetings<'a, B>
impl<'a, B> RefUnwindSafe for Greetings<'a, B>where
B: RefUnwindSafe,
impl<'a, B> Send for Greetings<'a, B>where
B: Sync,
impl<'a, B> Sync for Greetings<'a, B>where
B: Sync,
impl<'a, B> Unpin for Greetings<'a, B>
impl<'a, B> UnwindSafe for Greetings<'a, B>where
B: RefUnwindSafe,
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