[][src]Struct thirtyfour_sync::prelude::ScriptRetSync

pub struct ScriptRetSync<'a> { /* fields omitted */ }

Helper struct for getting return values from scripts. See the examples for WebDriver::execute_script() and WebDriver::execute_async_script().

Implementations

impl<'a> ScriptRetSync<'a>[src]

pub fn new(driver: &'a WebDriverSession, value: Value) -> Self[src]

Create a new ScriptRetSync. This is typically done automatically via WebDriver::execute_script() or WebDriver::execute_async_script()

pub fn value(&self) -> &Value[src]

Get the raw JSON value.

pub fn convert<T>(&self) -> WebDriverResult<T> where
    T: DeserializeOwned
[src]

pub fn get_element(&self) -> WebDriverResult<WebElement<'_>>[src]

Get a single WebElement return value. Your script must return only a single element for this to work.

pub fn get_elements(&self) -> WebDriverResult<Vec<WebElement<'_>>>[src]

Get a vec of WebElements from the return value. Your script must return an array of elements for this to work.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for ScriptRetSync<'a>

impl<'a> Send for ScriptRetSync<'a>

impl<'a> Sync for ScriptRetSync<'a>

impl<'a> Unpin for ScriptRetSync<'a>

impl<'a> !UnwindSafe for ScriptRetSync<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.