pub trait ServoInternalsMethods<D: DomTypes> {
// Required methods
fn ReportMemory(&self, _comp: InRealm<'_>, _can_gc: CanGc) -> Rc<D::Promise>;
fn GarbageCollectAllContexts(&self);
fn PreferenceList(&self) -> Vec<USVString>;
fn PreferenceType(&self, name: USVString) -> Fallible<USVString>;
fn DefaultPreferenceValue(
&self,
cx: SafeJSContext,
name: USVString,
rval: MutableHandleValue<'_>,
) -> Fallible<()>;
fn GetPreference(
&self,
cx: SafeJSContext,
name: USVString,
rval: MutableHandleValue<'_>,
) -> Fallible<()>;
fn GetStringPreference(&self, name: USVString) -> Fallible<USVString>;
fn GetIntPreference(&self, name: USVString) -> Fallible<i64>;
fn GetBoolPreference(&self, name: USVString) -> Fallible<bool>;
fn SetStringPreference(&self, name: USVString, value: USVString);
fn SetIntPreference(&self, name: USVString, value: i64);
fn SetBoolPreference(&self, name: USVString, value: bool);
}Required Methods§
fn ReportMemory(&self, _comp: InRealm<'_>, _can_gc: CanGc) -> Rc<D::Promise>
fn GarbageCollectAllContexts(&self)
fn PreferenceList(&self) -> Vec<USVString>
fn PreferenceType(&self, name: USVString) -> Fallible<USVString>
fn DefaultPreferenceValue( &self, cx: SafeJSContext, name: USVString, rval: MutableHandleValue<'_>, ) -> Fallible<()>
fn GetPreference( &self, cx: SafeJSContext, name: USVString, rval: MutableHandleValue<'_>, ) -> Fallible<()>
fn GetStringPreference(&self, name: USVString) -> Fallible<USVString>
fn GetIntPreference(&self, name: USVString) -> Fallible<i64>
fn GetBoolPreference(&self, name: USVString) -> Fallible<bool>
fn SetStringPreference(&self, name: USVString, value: USVString)
fn SetIntPreference(&self, name: USVString, value: i64)
fn SetBoolPreference(&self, name: USVString, value: bool)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".