pub struct Function { /* private fields */ }Available on crate feature
i-scripts only.Expand description
An individual function within a Library.
See the library documentation for more information.
Implementations§
source§impl Function
impl Function
sourcepub fn new<S: Into<Str>>(name: S, flags: Vec<FunctionFlag>) -> Self
pub fn new<S: Into<Str>>(name: S, flags: Vec<FunctionFlag>) -> Self
Create a new Function.
sourcepub fn flags(&self) -> &[FunctionFlag]
pub fn flags(&self) -> &[FunctionFlag]
Read the flags associated with the function.
sourcepub async fn fcall<R, C, K, V>(
&self,
client: &C,
keys: K,
args: V,
) -> RedisResult<R>where
R: FromRedis,
C: FunctionInterface + Send + Sync,
K: Into<MultipleKeys> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn fcall<R, C, K, V>(
&self,
client: &C,
keys: K,
args: V,
) -> RedisResult<R>where
R: FromRedis,
C: FunctionInterface + Send + Sync,
K: Into<MultipleKeys> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
Send the fcall command via the provided client.
sourcepub async fn fcall_ro<R, C, K, V>(
&self,
client: &C,
keys: K,
args: V,
) -> RedisResult<R>where
R: FromRedis,
C: FunctionInterface + Send + Sync,
K: Into<MultipleKeys> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
pub async fn fcall_ro<R, C, K, V>(
&self,
client: &C,
keys: K,
args: V,
) -> RedisResult<R>where
R: FromRedis,
C: FunctionInterface + Send + Sync,
K: Into<MultipleKeys> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<RedisError> + Send,
Send the fcall_ro command via the provided client.
Trait Implementations§
source§impl Ord for Function
impl Ord for Function
source§impl PartialOrd for Function
impl PartialOrd for Function
impl Eq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl !Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more