pub struct Message { /* private fields */ }Expand description
message from select object content.
Implementations§
Source§impl<'a> Message
impl<'a> Message
pub fn payload(&self) -> &[u8] ⓘ
Sourcepub fn is_records(&self) -> bool
pub fn is_records(&self) -> bool
Message type is Records. It can contain a single record, a partial record, or multiple records, depending on the number of search results.
Sourcepub fn is_progress(&self) -> bool
pub fn is_progress(&self) -> bool
Message type is Progress.
Sourcepub fn is_continuation(&self) -> bool
pub fn is_continuation(&self) -> bool
Message type is Continuation.
Sourcepub fn message_type(&self) -> Option<&String>
pub fn message_type(&self) -> Option<&String>
return the value of :message-type header.
Sourcepub fn is_error(&self) -> bool
pub fn is_error(&self) -> bool
Message type is Error, more info by error_code error_message method.
If returns this information, the End message information will not be returned.
Sourcepub fn error_code(&self) -> Option<&String>
pub fn error_code(&self) -> Option<&String>
return the value of :error-code header, None if this Message is not error.
Sourcepub fn error_message(&self) -> Option<&String>
pub fn error_message(&self) -> Option<&String>
return the value of :error-message header, None if this Message is not error.
Trait Implementations§
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