about summary refs log tree commit diff
path: root/src/libstd/to_bytes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/to_bytes.rs')
-rw-r--r--src/libstd/to_bytes.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/to_bytes.rs b/src/libstd/to_bytes.rs
index 20b45dfb2cc..77e7583ebe5 100644
--- a/src/libstd/to_bytes.rs
+++ b/src/libstd/to_bytes.rs
@@ -303,7 +303,11 @@ impl<A> IterBytes for *const A {
     }
 }
 
+/// A trait for converting a value to a list of bytes.
 pub trait ToBytes {
+    /// Converts the current value to a list of bytes. This is equivalent to
+    /// invoking iter_bytes on a type and collecting all yielded values in an
+    /// array
     fn to_bytes(&self, lsb0: bool) -> ~[u8];
 }