Struct redis_module::CallOptionsBuilder
source · pub struct CallOptionsBuilder { /* private fields */ }
Implementations§
source§impl CallOptionsBuilder
impl CallOptionsBuilder
pub fn new() -> CallOptionsBuilder
sourcepub fn no_writes(self) -> CallOptionsBuilder
pub fn no_writes(self) -> CallOptionsBuilder
Enable this option will not allow RM_Call to perform write commands
sourcepub fn script_mode(self) -> CallOptionsBuilder
pub fn script_mode(self) -> CallOptionsBuilder
Enable this option will run RM_Call is script mode. This mean that Redis will enable the following protections:
- Not allow running dangerous commands like ‘shutdown’
- Not allow running write commands on OOM or if there are not enough good replica’s connected
sourcepub fn verify_acl(self) -> CallOptionsBuilder
pub fn verify_acl(self) -> CallOptionsBuilder
Enable this option will perform ACL validation on the user attached to the context that is used to invoke the call.
sourcepub fn verify_oom(self) -> CallOptionsBuilder
pub fn verify_oom(self) -> CallOptionsBuilder
Enable this option will OOM validation before running the command
sourcepub fn errors_as_replies(self) -> CallOptionsBuilder
pub fn errors_as_replies(self) -> CallOptionsBuilder
Enable this option will return error as CallReply object instead of setting errno (it is usually recommend to enable it)
sourcepub fn replicate(self) -> CallOptionsBuilder
pub fn replicate(self) -> CallOptionsBuilder
Enable this option will cause the command to be replicaed to the replica and AOF
sourcepub fn resp(self, resp: CallOptionResp) -> CallOptionsBuilder
pub fn resp(self, resp: CallOptionResp) -> CallOptionsBuilder
Allow control the protocol version in which the replies will be returned.
sourcepub fn build(self) -> CallOptions
pub fn build(self) -> CallOptions
Construct a CallOption object that can be used to run commands using call_ext
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CallOptionsBuilder
impl Send for CallOptionsBuilder
impl Sync for CallOptionsBuilder
impl Unpin for CallOptionsBuilder
impl UnwindSafe for CallOptionsBuilder
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