[][src]Struct binjs::source::shift::Script

pub struct Script(_);

Methods

impl Script[src]

pub fn try_new(node_config: &NodeConfig, name: &str) -> Result<Self, Error>[src]

pub fn transform<I: ?Sized, O>(&self, input: &I) -> Result<O, Error> where
    I: Serialize,
    O: DeserializeOwned
[src]

This function is responsible for piping JSON inputs to the script in a newline-delimited format and parsing JSON outputs back.

Each output can be either {"type":"Ok","value":...} if operation was successful or {"type":"Err","value":...} if corresponding JS callback has failed with an error, and these are converted into Rust Result.

See start-json-stream.js for some more details.

Auto Trait Implementations

impl RefUnwindSafe for Script

impl Send for Script

impl Sync for Script

impl Unpin for Script

impl UnwindSafe for Script

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]