Document bindings/conversions.rs.

This commit is contained in:
Ms2ger 2014-11-07 18:33:38 +01:00
parent 223c3bc7ae
commit 3ed3c9a978

View file

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![deny(missing_doc)]
//! Conversions of Rust values to and from `JSVal`.
use dom::bindings::js::{JS, JSRef, Root};
@ -29,10 +31,15 @@ use std::slice;
use dom::bindings::codegen::PrototypeList;
/// A trait to retrieve the constants necessary to check if a `JSObject`
/// implements a given interface.
// FIXME (https://github.com/rust-lang/rfcs/pull/4)
// remove Option<Self> arguments.
pub trait IDLInterface {
/// Returns the prototype ID.
fn get_prototype_id(_: Option<Self>) -> PrototypeList::id::ID;
/// Returns the prototype depth, i.e., the number of interfaces this
/// interface inherits from.
fn get_prototype_depth(_: Option<Self>) -> uint;
}