Struct Client

Source
pub struct Client {
Show 18 fields pub fd: Fd, pub token: Token, pub flags: i32, pub query_buf: Vec<u8>, pub last_interaction: SystemTime, pub argv: Vec<RobjPtr>, pub authenticate: bool, pub reply_state: ReplyState, pub reply: Vec<RobjPtr>, pub reply_db_file: Option<File>, pub reply_db_off: u64, pub reply_db_size: u64, pub reply_off: usize, pub request_type: RequestType, pub multi_bulk_len: usize, pub bulk_len: Option<usize>, pub db_idx: usize, pub slave_select_db: usize,
}

Fields§

§fd: Fd§token: Token§flags: i32§query_buf: Vec<u8>§last_interaction: SystemTime§argv: Vec<RobjPtr>§authenticate: bool§reply_state: ReplyState§reply: Vec<RobjPtr>§reply_db_file: Option<File>§reply_db_off: u64§reply_db_size: u64§reply_off: usize§request_type: RequestType§multi_bulk_len: usize§bulk_len: Option<usize>§db_idx: usize§slave_select_db: usize

Implementations§

Source§

impl Client

Source

pub fn with_fd_and_el( fd: Fd, el: &mut AeEventLoop, ) -> Result<Rc<RefCell<Client>>, ()>

Source

pub fn with_fd(fd: Fd) -> Rc<RefCell<Client>>

Source

pub fn parse_query_buf(&mut self) -> Result<(), CommandError>

Source

pub fn process_input_buffer( &mut self, server: &mut Server, el: &mut AeEventLoop, )

Source

pub fn process_command( &mut self, server: &mut Server, el: &mut AeEventLoop, ) -> Result<(), CommandError>

Source

pub fn prepare_to_write(&mut self, el: &mut AeEventLoop) -> Result<(), ()>

Source

pub fn argc(&self) -> usize

Source

pub fn reset(&mut self)

Source

pub fn add_reply(&mut self, r: RobjPtr)

Source

pub fn add_str_reply(&mut self, s: &str)

Source

pub fn add_reply_from_string(&mut self, s: String)

Source

pub fn glue_reply(&mut self)

Source

pub fn is_slave(&self) -> bool

Source

pub fn is_monitor(&self) -> bool

Source

pub fn is_master(&self) -> bool

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl !Send for Client

§

impl !Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

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, 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