rustdoc: Update the demo module

This commit is contained in:
Brian Anderson 2012-03-09 16:44:22 -08:00
parent e399263b5e
commit 9f4c0d71e5
1 changed files with 69 additions and 91 deletions

View File

@ -33,106 +33,94 @@ fn take_my_order_please(
_order: [omnomnomy]
) -> uint {
#[doc(
desc = "OMG would you take my order already?",
args(_waitress = "The waitress that you want to bother",
_order = "The order vector. It should be filled with food."),
return = "The price of the order, including tax",
failure = "This function is full of fail"
)];
#[doc = "
OMG would you take my order already?
fail;
}
# Arguments
fn take_my_order_now(
_waitress: waitress,
_order: [omnomnomy]
) -> uint {
* _waitress - The waitress that you want to bother
* _order - The order vector. It should be filled with food
#[doc(
desc = "OMG would you take my order already?",
args(_waitress = "The waitress that you want to bother",
_order = "The order vector. It should be filled with food."),
return = "
# Return
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
nec molestie nisl. Duis massa risus, pharetra a scelerisque a,
molestie eu velit. Donec mattis ligula at ante imperdiet ut
dapibus mauris malesuada.
The price of the order, including tax
Sed gravida nisi a metus elementum sit amet hendrerit dolor
bibendum. Aenean sit amet neque massa, sed tempus tortor. Sed
ut lobortis enim. Proin a mauris quis nunc fermentum ultrices
eget a erat. Mauris in lectus vitae metus sodales
auctor. Morbi nunc quam, ultricies at venenatis non,
pellentesque ac dui.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec
molestie nisl. Duis massa risus, pharetra a scelerisque a,
molestie eu velit. Donec mattis ligula at ante imperdiet ut
dapibus mauris malesuada.
",
failure = "This function is full of fail"
)];
Sed gravida nisi a metus elementum sit amet hendrerit dolor
bibendum. Aenean sit amet neque massa, sed tempus tortor. Sed ut
lobortis enim. Proin a mauris quis nunc fermentum ultrices eget a
erat. Mauris in lectus vitae metus sodales auctor. Morbi nunc
quam, ultricies at venenatis non, pellentesque ac dui.
# Failure
This function is full of fail
"];
fail;
}
mod fortress_of_solitude {
#[doc(
brief = "Superman's vacation home",
desc = "
#[doc = "
Superman's vacation home
The fortress of solitude is located in the Arctic and it is
cold. What you may not know about the fortress of solitude
though is that it contains two separate bowling alleys. One of
them features bumper-bowling and is kind of lame.
The fortress of solitude is located in the Arctic and it is
cold. What you may not know about the fortress of solitude
though is that it contains two separate bowling alleys. One of
them features bumper-bowling and is kind of lame.
Really, it's pretty cool.
Really, it's pretty cool.
")];
"];
}
mod blade_runner {
#[doc(
brief = "Blade Runner is probably the best movie ever",
desc = "I like that in the world of Blade Runner it is always
raining, and that it's always night time. And Aliens
was also a really good movie.
#[doc = "
Blade Runner is probably the best movie ever
Alien 3 was crap though."
)];
I like that in the world of Blade Runner it is always
raining, and that it's always night time. And Aliens
was also a really good movie.
Alien 3 was crap though.
"];
}
#[doc(
brief = "Bored",
desc = "
#[doc = "
Bored
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec
molestie nisl. Duis massa risus, pharetra a scelerisque a,
molestie eu velit. Donec mattis ligula at ante imperdiet ut
dapibus mauris malesuada. Sed gravida nisi a metus elementum sit
amet hendrerit dolor bibendum. Aenean sit amet neque massa, sed
tempus tortor. Sed ut lobortis enim. Proin a mauris quis nunc
fermentum ultrices eget a erat. Mauris in lectus vitae metus
sodales auctor. Morbi nunc quam, ultricies at venenatis non,
pellentesque ac dui.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec
molestie nisl. Duis massa risus, pharetra a scelerisque a,
molestie eu velit. Donec mattis ligula at ante imperdiet ut
dapibus mauris malesuada. Sed gravida nisi a metus elementum sit
amet hendrerit dolor bibendum. Aenean sit amet neque massa, sed
tempus tortor. Sed ut lobortis enim. Proin a mauris quis nunc
fermentum ultrices eget a erat. Mauris in lectus vitae metus
sodales auctor. Morbi nunc quam, ultricies at venenatis non,
pellentesque ac dui.
Quisque vitae est id eros placerat laoreet sit amet eu
nisi. Curabitur suscipit neque porttitor est euismod
lacinia. Curabitur non quam vitae ipsum adipiscing
condimentum. Mauris ut ante eget metus sollicitudin
blandit. Aliquam erat volutpat. Morbi sed nisl mauris. Nulla
facilisi. Phasellus at mollis ipsum. Maecenas sed convallis
sapien. Nullam in ligula turpis. Pellentesque a neque augue. Sed
eget ante feugiat tortor congue auctor ac quis ante. Proin
condimentum lacinia tincidunt.
Quisque vitae est id eros placerat laoreet sit amet eu
nisi. Curabitur suscipit neque porttitor est euismod
lacinia. Curabitur non quam vitae ipsum adipiscing
condimentum. Mauris ut ante eget metus sollicitudin
blandit. Aliquam erat volutpat. Morbi sed nisl mauris. Nulla
facilisi. Phasellus at mollis ipsum. Maecenas sed convallis
sapien. Nullam in ligula turpis. Pellentesque a neque augue. Sed
eget ante feugiat tortor congue auctor ac quis ante. Proin
condimentum lacinia tincidunt.
")]
"]
resource bored(bored: bool) {
log(error, bored);
}
#[doc(
brief = "The Shunned House",
desc = "
#[doc = "
The Shunned House
From even the greatest of horrors irony is seldom absent. Sometimes it
enters directly into the composition of the events, while sometimes it
@ -147,11 +135,9 @@ northward along the same street to Mrs. Whitman's home and the
neighboring hillside churchyard of St. John's, whose hidden expanse of
Eighteenth Century gravestones had for him a peculiar fascination.
")]
"]
iface the_shunned_house {
#[doc(
desc = "
#[doc = "
Now the irony is this. In this walk, so many times repeated, the
world's greatest master of the terrible and the bizarre was
obliged to pass a particular house on the eastern side of the
@ -165,17 +151,14 @@ iface the_shunned_house {
unknowingly, and stands starkly leering as a symbol of all that is
unutterably hideous.
",
args(
a =
"A yard dating from a time when the region was partly
open country"
))]
# Arguments
* unkempt_yard - A yard dating from a time when the region was partly
open country
"]
fn dingy_house(unkempt_yard: int);
#[doc(
desc = "
#[doc = "
The house was--and for that matter still is--of a kind to attract
the attention of the curious. Originally a farm or semi-farm
building, it followed the average New England colonial lines of
@ -191,17 +174,12 @@ iface the_shunned_house {
the graveyards of the first settlers, and straightened only when
the removal of the bodies to the North Burial Ground made it
decently possible to cut through the old family plots.
",
return = "A dingy house with an unkempt yard",
failure = "Will fail if bodies are removed from premises"
)]
"]
fn construct() -> bool;
}
#[doc = "Whatever"]
impl of the_shunned_house for omnomnomy {
#[doc(args(_unkempt_yard = "Whatever"))]
fn dingy_house(_unkempt_yard: int) {
}