Struct tarantool::net_box::Conn [−][src]
Connection to remote Tarantool server
Implementations
impl Conn
[src]
pub fn new(addr: &str, options: ConnOptions) -> Result<Self, Error>
[src]
Create a new connection.
The connection is established on demand, at the time of the first request. It can be re-established automatically after a disconnect (see reconnect_after option). The returned conn object supports methods for making remote requests, such as select, update or delete.
See also: ConnOptions
pub fn wait_connected(&self, timeout: Option<Duration>) -> Result<bool, Error>
[src]
Wait for connection to be active or closed.
Returns:
Ok(true)
: if activeOk(true)
: if closedErr(...TimedOut...)
: on timeout
pub fn is_connected(&self) -> bool
[src]
Show whether connection is active or closed.
pub fn close(&self)
[src]
Close a connection.
pub fn ping(&self, options: &Options) -> Result<(), Error>
[src]
Execute a PING command.
options
– the supported option istimeout
pub fn call<T>(
&self,
function_name: &str,
args: &T,
options: &Options
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
[src]
&self,
function_name: &str,
args: &T,
options: &Options
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
Call a remote stored procedure.
conn.call("func", &("1", "2", "3"))
is the remote-call equivalent of func('1', '2', '3')
.
That is, conn.call
is a remote stored-procedure call.
The return from conn.call
is whatever the function returns.
pub fn eval<T>(
&self,
expression: &str,
args: &T,
options: &Options
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
[src]
&self,
expression: &str,
args: &T,
options: &Options
) -> Result<Option<Tuple>, Error> where
T: AsTuple,
Evaluates and executes the expression in Lua-string, which may be any statement or series of statements.
An execute privilege is required; if the user does not have it, an administrator may grant it with
box.schema.user.grant(username, 'execute', 'universe')
.
To ensure that the return from eval
is whatever the Lua expression returns, begin the Lua-string with the
word return
.
pub fn space(&self, name: &str) -> Result<Option<RemoteSpace>, Error>
[src]
Search space by name on remote server
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Conn
impl !Send for Conn
impl !Sync for Conn
impl Unpin for Conn
impl !UnwindSafe for Conn
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,
pub 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> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,