[−][src]Enum r2pipe::r2pipe::R2Pipe
Provides abstraction between the three invocation methods.
Variants
Pipe(R2PipeSpawn)
Lang(R2PipeLang)
Tcp(R2PipeTcp)
Http(R2PipeHttp)
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]
name: T,
opts: Option<R2PipeSpawnOptions>
) -> Result<R2Pipe, &'static str>
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]
names: Vec<&'static str>,
opts: Vec<Option<R2PipeSpawnOptions>>,
callback: Option<Arc<dyn Fn(u16, String) + Sync + Send>>
) -> Result<Vec<R2PipeThread>, &'static str>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,