libaster::protocol::redis

Struct Command

Source
pub struct Command {
    pub reply: Option<Message>,
    /* private fields */
}

Fields§

§reply: Option<Message>

Implementations§

Source§

impl Command

Source

pub fn into_cmd(self, notify: Notify) -> Cmd

Source

pub fn parse_cmd(buf: &mut BytesMut) -> Result<Option<Cmd>, AsError>

Source

pub fn reply_cmd(&self, buf: &mut BytesMut) -> Result<usize, AsError>

Source§

impl Command

Source

pub fn send_req(&self, buf: &mut BytesMut) -> Result<(), AsError>

save redis Command into given BytesMut

Source§

impl Command

Source

pub fn key_hash<T>(&self, hash_tag: &[u8], method: T) -> u64
where T: Fn(&[u8]) -> u64,

Source

pub fn subs(&self) -> Option<Vec<Cmd>>

Source

pub fn is_done(&self) -> bool

Source

pub fn cycle(&self) -> u8

Source

pub fn can_cycle(&self) -> bool

Source

pub fn add_cycle(&mut self)

Source

pub fn is_ask(&self) -> bool

Source

pub fn unset_ask(&mut self)

Source

pub fn set_ask(&mut self)

Source

pub fn is_moved(&mut self) -> bool

Source

pub fn set_moved(&mut self)

Source

pub fn unset_moved(&mut self)

Source

pub fn is_error(&self) -> bool

Source

pub fn is_read(&self) -> bool

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Command

§

impl !RefUnwindSafe for Command

§

impl !Send for Command

§

impl !Sync for Command

§

impl Unpin for Command

§

impl !UnwindSafe for Command

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoReply<T> for T

Source§

fn into_reply(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V