pub enum Frame {
RegisterPublisher(PublisherPayload),
RegisterSubscriber(SubscriberPayload),
RegisterReplier(ReplierPayload),
RegisterRequestor(RequestorPayload),
Message(MessagePayload),
BatchMessage(BatchPayload),
Error(ErrorPayload),
Ok,
}
Variants§
RegisterPublisher(PublisherPayload)
RegisterSubscriber(SubscriberPayload)
RegisterReplier(ReplierPayload)
RegisterRequestor(RequestorPayload)
Message(MessagePayload)
BatchMessage(BatchPayload)
Error(ErrorPayload)
Ok
Implementations§
Source§impl Frame
impl Frame
pub fn get_length(&self) -> Result<u64>
pub fn get_type(&self) -> u8
pub fn get_topic(&self) -> Option<&TopicName>
pub fn write_to_bytes(self, dst: &mut BytesMut) -> Result<()>
pub fn retention_policy(&self) -> Option<u64>
pub fn batch_size(&self) -> Option<u32>
pub fn message(&self) -> Option<&[u8]>
pub fn unwrap_message(self) -> MessagePayload
Trait Implementations§
Source§impl Encoder<Frame> for MessageCodec
impl Encoder<Frame> for MessageCodec
Source§impl Sink<Frame> for BiStream
impl Sink<Frame> for BiStream
Source§type Error = SeliumError
type Error = SeliumError
The type of value produced by the sink when an error occurs.
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn start_send(self: Pin<&mut Self>, item: Frame) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Frame) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreSource§impl Sink<Frame> for WriteHalf
impl Sink<Frame> for WriteHalf
Source§type Error = SeliumError
type Error = SeliumError
The type of value produced by the sink when an error occurs.
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn start_send(self: Pin<&mut Self>, item: Frame) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Frame) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreimpl StructuralPartialEq for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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