pub struct Message {
pub rtype: RespType,
pub data: Bytes,
}Fields§
§rtype: RespType§data: BytesImplementations§
Source§impl Message
impl Message
pub fn new_cluster_slots() -> Message
pub fn new_read_only() -> Message
pub fn new_ping_request() -> Message
pub fn inline_raw(data: Bytes) -> Message
pub fn plain<I: Into<Bytes>>(data: I, resp_type: u8) -> Message
pub fn save(&self, buf: &mut BytesMut) -> usize
pub fn save_by_rtype(&self, rtype: &RespType, buf: &mut BytesMut) -> usize
pub fn raw_data(&self) -> &[u8] ⓘ
pub fn data(&self) -> Option<&[u8]>
pub fn nth(&self, index: usize) -> Option<&[u8]>
pub fn iter(&self) -> MessageIter<'_> ⓘ
pub fn check_redirect(&self) -> Option<Redirect>
Trait Implementations§
Source§impl From<MessageMut> for Message
impl From<MessageMut> for Message
Source§fn from(_: MessageMut) -> Message
fn from(_: MessageMut) -> Message
Converts to this type from the input type.
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl !Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.