[][src]Enum r2pipe::r2pipe::R2Pipe

pub enum R2Pipe {
    Pipe(R2PipeSpawn),
    Lang(R2PipeLang),
    Tcp(R2PipeTcp),
    Http(R2PipeHttp),
}

Provides abstraction between the three invocation methods.

Variants

Implementations

impl R2Pipe[src]

pub fn open() -> Result<R2Pipe, &'static str>[src]

pub fn cmd(&mut self, cmd: &str) -> Result<String, String>[src]

pub fn cmdj(&mut self, cmd: &str) -> Result<Value, String>[src]

pub fn close(&mut self)[src]

pub fn in_session() -> Option<(i32, i32)>[src]

pub fn spawn<T: AsRef<str>>(
    name: T,
    opts: Option<R2PipeSpawnOptions>
) -> Result<R2Pipe, &'static str>
[src]

Creates a new R2PipeSpawn.

pub fn tcp<A: ToSocketAddrs>(addr: A) -> Result<R2Pipe, &'static str>[src]

Creates a new R2PipeTcp

pub fn http(host: &str) -> Result<R2Pipe, &'static str>[src]

Creates a new R2PipeHttp

pub fn threads(
    names: Vec<&'static str>,
    opts: Vec<Option<R2PipeSpawnOptions>>,
    callback: Option<Arc<dyn Fn(u16, String) + Sync + Send>>
) -> Result<Vec<R2PipeThread>, &'static str>
[src]

Creates new pipe threads First two arguments for R2Pipe::threads() are the same as for R2Pipe::spawn() but inside vectors Third and last argument is an option to a callback function The callback function takes two Arguments: Thread ID and r2pipe output

Auto Trait Implementations

impl RefUnwindSafe for R2Pipe

impl Send for R2Pipe

impl Sync for R2Pipe

impl Unpin for R2Pipe

impl UnwindSafe for R2Pipe

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, 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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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