#[repr(C)]pub struct Text {
characterdata: CharacterData,
}
Expand description
An HTML text node.
Fields§
§characterdata: CharacterData
Implementations§
source§impl Text
impl Text
fn __assert_parent_type(&self)
source§impl Text
impl Text
pub fn new_inherited(text: DOMString, document: &Document) -> Text
pub fn new(text: DOMString, document: &Document) -> Root<Dom<Text>>
fn new_with_proto(
text: DOMString,
document: &Document,
proto: Option<HandleObject<'_>>
) -> Root<Dom<Text>>
pub fn Constructor(
window: &Window,
proto: Option<HandleObject<'_>>,
text: DOMString
) -> Result<Root<Dom<Text>>, Error>
Trait Implementations§
source§impl Castable for Text
impl Castable for Text
source§impl DomObjectWrap for Text
impl DomObjectWrap for Text
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextBinding::TextBinding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::text::Text>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::text::Text>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::TextBinding::TextBinding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::text::Text>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::text::Text>>}
Function pointer to the general wrap function type
source§impl HasParent for Text
impl HasParent for Text
source§fn as_parent(&self) -> &CharacterData
fn as_parent(&self) -> &CharacterData
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = CharacterData
source§impl IDLInterface for Text
impl IDLInterface for Text
source§impl MallocSizeOf for Text
impl MallocSizeOf for Text
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for Text
impl MutDomObject for Text
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<Text> for Text
impl PartialEq<Text> for Text
source§impl TextMethods for Text
impl TextMethods for Text
source§impl ToJSValConvertible for Text
impl ToJSValConvertible for Text
impl DerivedFrom<CharacterData> for Text
impl DerivedFrom<EventTarget> for Text
impl DerivedFrom<Node> for Text
impl DerivedFrom<Text> for CDATASection
impl DerivedFrom<Text> for Text
Auto Trait Implementations§
impl !RefUnwindSafe for Text
impl !Send for Text
impl !Sync for Text
impl Unpin for Text
impl !UnwindSafe for Text
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert