pub struct JsValue { /* private fields */ }
Expand description
Represents a value that exists on the JavaScript side. Value can be anything - number, string, object, undefined, null, …
Implementations§
Source§impl JsValue
impl JsValue
Sourcepub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>
pub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>
Retrive this value from the JS side to the Rust side. Returns Future whose output is a serde_json::Value.
§use wsdom::dom::Browser
§use wsdom::dom::HTMLInputElement;
async fn example(input: &HTMLInputElement) { let _val = input.get_value().retrieve_json().await; }
Trait Implementations§
Source§impl AsRef<JsValue> for AbstractRange
impl AsRef<JsValue> for AbstractRange
Source§impl AsRef<JsValue> for AnimationEffect
impl AsRef<JsValue> for AnimationEffect
Source§impl AsRef<JsValue> for AnimationTimeline
impl AsRef<JsValue> for AnimationTimeline
Source§impl AsRef<JsValue> for AudioScheduledSourceNode
impl AsRef<JsValue> for AudioScheduledSourceNode
Source§impl AsRef<JsValue> for AuthenticatorResponse
impl AsRef<JsValue> for AuthenticatorResponse
Source§impl AsRef<JsValue> for BaseAudioContext
impl AsRef<JsValue> for BaseAudioContext
Source§impl AsRef<JsValue> for CSSConditionRule
impl AsRef<JsValue> for CSSConditionRule
Source§impl AsRef<JsValue> for CSSGroupingRule
impl AsRef<JsValue> for CSSGroupingRule
Source§impl AsRef<JsValue> for CSSMathValue
impl AsRef<JsValue> for CSSMathValue
Source§impl AsRef<JsValue> for CSSNumericValue
impl AsRef<JsValue> for CSSNumericValue
Source§impl AsRef<JsValue> for CSSStyleValue
impl AsRef<JsValue> for CSSStyleValue
Source§impl AsRef<JsValue> for CSSTransformComponent
impl AsRef<JsValue> for CSSTransformComponent
Source§impl AsRef<JsValue> for CharacterData
impl AsRef<JsValue> for CharacterData
Source§impl AsRef<JsValue> for Credential
impl AsRef<JsValue> for Credential
Source§impl AsRef<JsValue> for DOMException
impl AsRef<JsValue> for DOMException
Source§impl AsRef<JsValue> for DOMMatrixReadOnly
impl AsRef<JsValue> for DOMMatrixReadOnly
Source§impl AsRef<JsValue> for DOMPointReadOnly
impl AsRef<JsValue> for DOMPointReadOnly
Source§impl AsRef<JsValue> for DOMRectReadOnly
impl AsRef<JsValue> for DOMRectReadOnly
Source§impl AsRef<JsValue> for DocumentFragment
impl AsRef<JsValue> for DocumentFragment
Source§impl AsRef<JsValue> for EventTarget
impl AsRef<JsValue> for EventTarget
Source§impl AsRef<JsValue> for FileSystemEntry
impl AsRef<JsValue> for FileSystemEntry
Source§impl AsRef<JsValue> for FileSystemHandle
impl AsRef<JsValue> for FileSystemHandle
Source§impl AsRef<JsValue> for HTMLElement
impl AsRef<JsValue> for HTMLElement
Source§impl AsRef<JsValue> for HTMLMediaElement
impl AsRef<JsValue> for HTMLMediaElement
Source§impl AsRef<JsValue> for HTMLTableCellElement
impl AsRef<JsValue> for HTMLTableCellElement
Source§impl<T> AsRef<JsValue> for JsNullable<T>
impl<T> AsRef<JsValue> for JsNullable<T>
Source§impl AsRef<JsValue> for MediaDeviceInfo
impl AsRef<JsValue> for MediaDeviceInfo
Source§impl AsRef<JsValue> for MediaStreamTrack
impl AsRef<JsValue> for MediaStreamTrack
Source§impl AsRef<JsValue> for MouseEvent
impl AsRef<JsValue> for MouseEvent
Source§impl AsRef<JsValue> for PaymentRequestUpdateEvent
impl AsRef<JsValue> for PaymentRequestUpdateEvent
Source§impl AsRef<JsValue> for PerformanceEntry
impl AsRef<JsValue> for PerformanceEntry
Source§impl AsRef<JsValue> for PerformanceResourceTiming
impl AsRef<JsValue> for PerformanceResourceTiming
Source§impl AsRef<JsValue> for SVGAnimationElement
impl AsRef<JsValue> for SVGAnimationElement
Source§impl AsRef<JsValue> for SVGElement
impl AsRef<JsValue> for SVGElement
Source§impl AsRef<JsValue> for SVGGeometryElement
impl AsRef<JsValue> for SVGGeometryElement
Source§impl AsRef<JsValue> for SVGGradientElement
impl AsRef<JsValue> for SVGGradientElement
Source§impl AsRef<JsValue> for SVGGraphicsElement
impl AsRef<JsValue> for SVGGraphicsElement
Source§impl AsRef<JsValue> for SVGTextContentElement
impl AsRef<JsValue> for SVGTextContentElement
Source§impl AsRef<JsValue> for SVGTextPositioningElement
impl AsRef<JsValue> for SVGTextPositioningElement
Source§impl AsRef<JsValue> for SpeechSynthesisEvent
impl AsRef<JsValue> for SpeechSynthesisEvent
Source§impl AsRef<JsValue> for StylePropertyMapReadOnly
impl AsRef<JsValue> for StylePropertyMapReadOnly
Source§impl AsRef<JsValue> for StyleSheet
impl AsRef<JsValue> for StyleSheet
Source§impl AsRef<JsValue> for TextTrackCue
impl AsRef<JsValue> for TextTrackCue
Source§impl AsRef<JsValue> for XMLHttpRequestEventTarget
impl AsRef<JsValue> for XMLHttpRequestEventTarget
Source§impl Into<JsValue> for AbstractRange
impl Into<JsValue> for AbstractRange
Source§impl Into<JsValue> for AnimationEffect
impl Into<JsValue> for AnimationEffect
Source§impl Into<JsValue> for AnimationTimeline
impl Into<JsValue> for AnimationTimeline
Source§impl Into<JsValue> for AudioScheduledSourceNode
impl Into<JsValue> for AudioScheduledSourceNode
Source§impl Into<JsValue> for AuthenticatorResponse
impl Into<JsValue> for AuthenticatorResponse
Source§impl Into<JsValue> for BaseAudioContext
impl Into<JsValue> for BaseAudioContext
Source§impl Into<JsValue> for CSSConditionRule
impl Into<JsValue> for CSSConditionRule
Source§impl Into<JsValue> for CSSGroupingRule
impl Into<JsValue> for CSSGroupingRule
Source§impl Into<JsValue> for CSSMathValue
impl Into<JsValue> for CSSMathValue
Source§impl Into<JsValue> for CSSNumericValue
impl Into<JsValue> for CSSNumericValue
Source§impl Into<JsValue> for CSSStyleValue
impl Into<JsValue> for CSSStyleValue
Source§impl Into<JsValue> for CSSTransformComponent
impl Into<JsValue> for CSSTransformComponent
Source§impl Into<JsValue> for CharacterData
impl Into<JsValue> for CharacterData
Source§impl Into<JsValue> for Credential
impl Into<JsValue> for Credential
Source§impl Into<JsValue> for DOMException
impl Into<JsValue> for DOMException
Source§impl Into<JsValue> for DOMMatrixReadOnly
impl Into<JsValue> for DOMMatrixReadOnly
Source§impl Into<JsValue> for DOMPointReadOnly
impl Into<JsValue> for DOMPointReadOnly
Source§impl Into<JsValue> for DOMRectReadOnly
impl Into<JsValue> for DOMRectReadOnly
Source§impl Into<JsValue> for DocumentFragment
impl Into<JsValue> for DocumentFragment
Source§impl Into<JsValue> for EventTarget
impl Into<JsValue> for EventTarget
Source§impl Into<JsValue> for FileSystemEntry
impl Into<JsValue> for FileSystemEntry
Source§impl Into<JsValue> for FileSystemHandle
impl Into<JsValue> for FileSystemHandle
Source§impl Into<JsValue> for HTMLElement
impl Into<JsValue> for HTMLElement
Source§impl Into<JsValue> for HTMLMediaElement
impl Into<JsValue> for HTMLMediaElement
Source§impl Into<JsValue> for HTMLTableCellElement
impl Into<JsValue> for HTMLTableCellElement
Source§impl<T> Into<JsValue> for JsNullable<T>
impl<T> Into<JsValue> for JsNullable<T>
Source§impl Into<JsValue> for MediaDeviceInfo
impl Into<JsValue> for MediaDeviceInfo
Source§impl Into<JsValue> for MediaStreamTrack
impl Into<JsValue> for MediaStreamTrack
Source§impl Into<JsValue> for MouseEvent
impl Into<JsValue> for MouseEvent
Source§impl Into<JsValue> for PaymentRequestUpdateEvent
impl Into<JsValue> for PaymentRequestUpdateEvent
Source§impl Into<JsValue> for PerformanceEntry
impl Into<JsValue> for PerformanceEntry
Source§impl Into<JsValue> for PerformanceResourceTiming
impl Into<JsValue> for PerformanceResourceTiming
Source§impl Into<JsValue> for SVGAnimationElement
impl Into<JsValue> for SVGAnimationElement
Source§impl Into<JsValue> for SVGElement
impl Into<JsValue> for SVGElement
Source§impl Into<JsValue> for SVGGeometryElement
impl Into<JsValue> for SVGGeometryElement
Source§impl Into<JsValue> for SVGGradientElement
impl Into<JsValue> for SVGGradientElement
Source§impl Into<JsValue> for SVGGraphicsElement
impl Into<JsValue> for SVGGraphicsElement
Source§impl Into<JsValue> for SVGTextContentElement
impl Into<JsValue> for SVGTextContentElement
Source§impl Into<JsValue> for SVGTextPositioningElement
impl Into<JsValue> for SVGTextPositioningElement
Source§impl Into<JsValue> for SpeechSynthesisEvent
impl Into<JsValue> for SpeechSynthesisEvent
Source§impl Into<JsValue> for StylePropertyMapReadOnly
impl Into<JsValue> for StylePropertyMapReadOnly
Source§impl Into<JsValue> for StyleSheet
impl Into<JsValue> for StyleSheet
Source§impl Into<JsValue> for TextTrackCue
impl Into<JsValue> for TextTrackCue
Source§impl Into<JsValue> for XMLHttpRequestEventTarget
impl Into<JsValue> for XMLHttpRequestEventTarget
Source§impl JsCast for JsValue
impl JsCast for JsValue
fn unchecked_from_js(val: JsValue) -> JsValue
fn unchecked_from_js_ref(val: &JsValue) -> &JsValue
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
Source§impl UseInJsCode for JsValue
impl UseInJsCode for JsValue
impl<'a> ToJs<JsValue> for &'a str
impl ToJs<JsValue> for bool
impl ToJs<JsValue> for f32
impl ToJs<JsValue> for f64
impl ToJs<JsValue> for i16
impl ToJs<JsValue> for i32
impl ToJs<JsValue> for i64
impl ToJs<JsValue> for i8
impl ToJs<JsValue> for isize
impl ToJs<JsValue> for str
impl ToJs<JsValue> for u16
impl ToJs<JsValue> for u32
impl ToJs<JsValue> for u64
impl ToJs<JsValue> for u8
impl ToJs<JsValue> for usize
Auto Trait Implementations§
impl Freeze for JsValue
impl RefUnwindSafe for JsValue
impl Send for JsValue
impl Sync for JsValue
impl Unpin for JsValue
impl UnwindSafe for JsValue
Blanket Implementations§
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