Trait script::dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoder_Binding::TextEncoderMethods
source · pub trait TextEncoderMethods<D: DomTypes> {
// Required methods
fn Encoding(&self) -> DOMString;
fn Encode(&self, cx: SafeJSContext, input: USVString) -> Uint8Array;
fn EncodeInto(
&self,
source: USVString,
destination: CustomAutoRooterGuard<'_, Uint8Array>,
) -> TextEncoderEncodeIntoResult;
fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
) -> Result<Root<Dom<TextEncoder>>, Error>;
}
Required Methods§
fn Encoding(&self) -> DOMString
fn Encode(&self, cx: SafeJSContext, input: USVString) -> Uint8Array
fn EncodeInto( &self, source: USVString, destination: CustomAutoRooterGuard<'_, Uint8Array>, ) -> TextEncoderEncodeIntoResult
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Result<Root<Dom<TextEncoder>>, Error>
Object Safety§
This trait is not object safe.