mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Document bindings/conversions.rs.
This commit is contained in:
parent
223c3bc7ae
commit
3ed3c9a978
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue