pub struct LinuxTuplesConnection {
pub connection: SocketAddr,
}
Expand description
Fields§
§connection: SocketAddr
Implementations§
Source§impl LinuxTuplesConnection
impl LinuxTuplesConnection
Sourcepub fn read_all_tuples(&self, tuples: &Vec<Vec<E>>) -> Result<Vec<Vec<E>>>
pub fn read_all_tuples(&self, tuples: &Vec<Vec<E>>) -> Result<Vec<Vec<E>>>
Reads all tuples from the tuple space that satisfy templates
If nothing found, returns empty vector. If template list is empty, returns all tuples in the space.
§Examples
let tuple_list = conn.read_all_tuples(&vec![vec![E::I(123), E::None], vec![E::S("123".to_string()), E::None]]).unwrap();
§Errors
Returns Err if disconnected, or incorrect data arrived
Sourcepub fn number_of_tuples(&self, tuples: &Vec<Vec<E>>) -> Result<i32>
pub fn number_of_tuples(&self, tuples: &Vec<Vec<E>>) -> Result<i32>
Calculates a number tuples from the tuple space that satisfy templates
If nothing found, 0. If template list is empty, returns number of all tuples in the space.
§Examples
let count = conn.number_of_tuples(&vec![vec![E::I(123), E::None], vec![E::S("123".to_string()), E::None]]).unwrap();
§Errors
Returns Err if disconnected, or incorrect data arrived
Sourcepub fn server_log(&self) -> Result<String>
pub fn server_log(&self) -> Result<String>
Sourcepub fn print_tuple(tuple: &Vec<E>)
pub fn print_tuple(tuple: &Vec<E>)
Prints a tuple to the standard output
§Examples
LinuxTuplesConnection::print_tuple(&vec![E::I(123)]);
Trait Implementations§
Source§impl Clone for LinuxTuplesConnection
impl Clone for LinuxTuplesConnection
Source§fn clone(&self) -> LinuxTuplesConnection
fn clone(&self) -> LinuxTuplesConnection
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LinuxTuplesConnection
impl RefUnwindSafe for LinuxTuplesConnection
impl Send for LinuxTuplesConnection
impl Sync for LinuxTuplesConnection
impl Unpin for LinuxTuplesConnection
impl UnwindSafe for LinuxTuplesConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more