Created
October 25, 2014 12:20
-
-
Save Manishearth/4db6b5873dd0f4eef437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub trait Show { | |
#[scheme( | |
TupleLike(try!(fmt.write_str(concat!($_name, "("))); try!($_); fmt.write(b")")), | |
AnonymousList(try!($_);try!(fmt.write_str(","))), | |
NamedList(try!(fmt.write_str(concat!($_name,":")));try!($_);try!(fmt.write_str(","))), | |
StructLike(try!(fmt.write_str(concat!($_name, "{"))); try!($_); fmt.write(b"}")), | |
UnitLike(fmt.write_str($_name)) | |
)] | |
fn fmt(&self, fmt: &mut Formatter) -> Result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment