[][src]Struct show_notes::e001::TVShow

pub struct TVShow {
    pub theme: String,
    pub year: i32,
    director: String,
}

This is a sample structure, to demonstrate rustdoc/cargo doc.

All of this will be attached to the structure definition when you see it live on the site. If you need to document members, you can do it inline!

It's worth taking a look at the source for this: you can see how private and public fields are handled differently in the documentation.

Fields

theme: String

Here is a string telling us what the theme song was.

year: i32

Here is the year the show premiered.

director: String

Here is the director---but (s)he's rather shy and private.

Methods

impl TVShow[src]

You can also document the implementation. This is usually not going to be something you particularly need with a struct, because you can just attach the documentation to the struct itself. However, it is the kind of thing that could be useful if you are implementing a trait. (More on that in a later episode!)

pub fn new(theme: &str, year: i32, director: &str) -> TVShow[src]

This documents a fairly ho-hum structure constructor.

This example is not tested
let a_struct = TVShow::new("The Answer", 42, "Joss Whedon");

Auto Trait Implementations

impl Send for TVShow

impl Unpin for TVShow

impl Sync for TVShow

impl RefUnwindSafe for TVShow

impl UnwindSafe for TVShow

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]