[−][src]Struct show_notes::e013::Individual
An individual person defined in a way that includes a reference type.
The lifetime of the reference member, name
, needs to match the lifetime of
the Person
itself. We'd end up with a pretty weird scenario otherwise!
Note that the lifetimes of the members match the lifetime declared for the type itself, so the references must live at least as long as the instance of the type to which they're attached.
Fields
name: &'a str
The person's name, as a string reference.
age: i16
Just in case we're talking about a character from Genesis
Methods
impl<'a> Individual<'a>
[src]
Note that the implementation block also has the lifetimes declared.
Auto Trait Implementations
impl<'a> Send for Individual<'a>
impl<'a> Unpin for Individual<'a>
impl<'a> Sync for Individual<'a>
impl<'a> RefUnwindSafe for Individual<'a>
impl<'a> UnwindSafe for Individual<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,