Struct redisai::RedisAIClient [−][src]
To use the RedisAIClient you need to create a redis-rs client. redis-rs
use redisai::{RedisAIClient, AIDataType}; use redis::Client; let aiclient: RedisAIClient = RedisAIClient { debug: false }; let client = Client::open("redis://127.0.0.1/").unwrap(); let mut con = client.get_connection().unwrap(); let tensor: Vec<f64> = vec![1., 2., 3., 4.]; let shape: Vec<usize> = vec![4]; aiclient.ai_tensorset( &mut con, "one_dim_double_tensor".to_string(), AIDataType::DOUBLE, shape, tensor );
Fields
debug: bool
Implementations
impl RedisAIClient
[src]
pub fn ai_loadbackend(
&self,
con: &mut Connection,
identifier: String,
path: String
) -> RedisResult<()>
[src]
&self,
con: &mut Connection,
identifier: String,
path: String
) -> RedisResult<()>
impl RedisAIClient
[src]
pub fn ai_infoget(
&self,
con: &mut Connection,
key: Option<String>
) -> RedisResult<AIInfo>
[src]
&self,
con: &mut Connection,
key: Option<String>
) -> RedisResult<AIInfo>
pub fn ai_inforeset(&self, con: &mut Connection, key: String) -> RedisResult<()>
[src]
impl RedisAIClient
[src]
pub fn ai_tensorset<T>(
&self,
con: &mut Connection,
key: String,
dtype: AIDataType,
shape: Vec<usize>,
tensor: Vec<T>
) -> RedisResult<()> where
Vec<T>: ToFromBlob,
[src]
&self,
con: &mut Connection,
key: String,
dtype: AIDataType,
shape: Vec<usize>,
tensor: Vec<T>
) -> RedisResult<()> where
Vec<T>: ToFromBlob,
pub fn ai_tensorget<T>(
&self,
con: &mut Connection,
key: String
) -> RedisResult<AITensor<T>> where
T: Debug + FromRedisValue + ToFromBlob,
[src]
&self,
con: &mut Connection,
key: String
) -> RedisResult<AITensor<T>> where
T: Debug + FromRedisValue + ToFromBlob,
Trait Implementations
impl Clone for RedisAIClient
[src]
fn clone(&self) -> RedisAIClient
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RedisAIClient
[src]
Auto Trait Implementations
impl RefUnwindSafe for RedisAIClient
impl Send for RedisAIClient
impl Sync for RedisAIClient
impl Unpin for RedisAIClient
impl UnwindSafe for RedisAIClient
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,