pub struct ArrayBufferView<'js> { /* private fields */ }Implementations§
Source§impl<'js> ArrayBufferView<'js>
impl<'js> ArrayBufferView<'js>
pub fn from_buffer(ctx: &Ctx<'js>, buffer: Buffer) -> Result<Self>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_bytes(&self) -> Option<&[u8]>
Sourcepub fn as_bytes_mut(&mut self) -> Option<&mut [u8]>
pub fn as_bytes_mut(&mut self) -> Option<&mut [u8]>
Mutable buffer for the view.
§Safety
This is only safe if you have a lock on the runtime. Do not pass it directly to other threads.
Trait Implementations§
Source§impl<'js> FromJs<'js> for ArrayBufferView<'js>
impl<'js> FromJs<'js> for ArrayBufferView<'js>
Auto Trait Implementations§
impl<'js> !Send for ArrayBufferView<'js>
impl<'js> !Sync for ArrayBufferView<'js>
impl<'js> !UnwindSafe for ArrayBufferView<'js>
impl<'js> Freeze for ArrayBufferView<'js>
impl<'js> RefUnwindSafe for ArrayBufferView<'js>
impl<'js> Unpin for ArrayBufferView<'js>
impl<'js> UnsafeUnpin for ArrayBufferView<'js>
Blanket Implementations§
Source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
Source§fn param_requirement() -> ParamRequirement
fn param_requirement() -> ParamRequirement
The parameters requirements this value requires.
Source§fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
Convert from a parameter value.
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more