rustdoc: Add ifaces to demo module

This commit is contained in:
Brian Anderson 2012-01-30 20:54:02 -08:00
parent 38197d8728
commit bc450e60c3
1 changed files with 69 additions and 0 deletions

View File

@ -98,4 +98,73 @@ mod blade_runner {
")]
resource bored(bored: bool) {
log(error, bored);
}
#[doc(
brief = "The Shunned House",
desc = "
From even the greatest of horrors irony is seldom absent. Sometimes it
enters directly into the composition of the events, while sometimes it
relates only to their fortuitous position among persons and
places. The latter sort is splendidly exemplified by a case in the
ancient city of Providence, where in the late forties Edgar Allan Poe
used to sojourn often during his unsuccessful wooing of the gifted
poetess, Mrs. Whitman. Poe generally stopped at the Mansion House in
Benefit Street--the renamed Golden Ball Inn whose roof has sheltered
Washington, Jefferson, and Lafayette--and his favorite walk led
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 = "
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
street; a dingy, antiquated structure perched on the abruptly
rising side hill, with a great unkempt yard dating from a time
when the region was partly open country. It does not appear that
he ever wrote or spoke of it, nor is there any evidence that he
even noticed it. And yet that house, to the two persons in
possession of certain information, equals or outranks in horror
the wildest fantasy of the genius who so often passed it
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"
))]
fn dingy_house(unkempt_yard: int);
#[doc(
desc = "
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
the middle Eighteenth Century--the prosperous peaked-roof sort,
with two stories and dormerless attic, and with the Georgian
doorway and interior panelling dictated by the progress of taste
at that time. It faced south, with one gable end buried to the
lower windows in the eastward rising hill, and the other exposed
to the foundations toward the street. Its construction, over a
century and a half ago, had followed the grading and straightening
of the road in that especial vicinity; for Benefit Street--at
first called Back Street--was laid out as a lane winding amongst
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;
}