Struct rusteron_archive::AeronImage
source · pub struct AeronImage { /* private fields */ }
Implementations§
source§impl AeronImage
impl AeronImage
pub fn new_zeroed() -> Result<Self, AeronCError>
sourcepub fn constants(
&self,
constants: &AeronImageConstants,
) -> Result<i32, AeronCError>
pub fn constants( &self, constants: &AeronImageConstants, ) -> Result<i32, AeronCError>
sourcepub fn position(&self) -> i64
pub fn position(&self) -> i64
The position this image has been consumed to by the subscriber.
§Return
the position this image has been consumed to by the subscriber.
sourcepub fn set_position(&self, position: i64) -> Result<i32, AeronCError>
pub fn set_position(&self, position: i64) -> Result<i32, AeronCError>
Set the subscriber position for this image to indicate where it has been consumed to.
§Parameters
image
to set the position of.
sourcepub fn is_end_of_stream(&self) -> bool
pub fn is_end_of_stream(&self) -> bool
Is the current consumed position at the end of the stream?
§Return
true if at the end of the stream or false if not.
sourcepub fn end_of_stream_position(&self) -> i64
pub fn end_of_stream_position(&self) -> i64
The position the stream reached when EOS was received from the publisher. The position will be INT64_MAX until the stream ends and EOS is set.
§Return
position the stream reached when EOS was received from the publisher.
sourcepub fn active_transport_count(&self) -> Result<i32, AeronCError>
pub fn active_transport_count(&self) -> Result<i32, AeronCError>
Count of observed active transports within the image liveness timeout.
If the image is closed, then this is 0. This may also be 0 if no actual datagrams have arrived. IPC Images also will be 0.
§Return
count of active transports - 0 if Image is closed, no datagrams yet, or IPC. Or -1 for error.
sourcepub fn poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>(
&self,
handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>( &self, handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of fragments as specified.
Use a fragment assembler to assemble messages which span multiple fragments.
§Parameters
-
handler
to which message fragments are delivered. -
clientd
to pass to the handler. -
fragment_limit
for the number of fragments to be consumed during one polling operation.
§Return
the number of fragments that have been consumed or -1 for error.
sourcepub fn controlled_poll<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>(
&self,
handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn controlled_poll<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>( &self, handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of fragments as specified.
Use a controlled fragment assembler to assemble messages which span multiple fragments.
§Parameters
-
handler
to which message fragments are delivered. -
clientd
to pass to the handler. -
fragment_limit
for the number of fragments to be consumed during one polling operation.
§Return
the number of fragments that have been consumed or -1 for error.
sourcepub fn bounded_poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>(
&self,
handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>,
limit_position: i64,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn bounded_poll<AeronFragmentHandlerHandlerImpl: AeronFragmentHandlerCallback>( &self, handler: Option<&Handler<AeronFragmentHandlerHandlerImpl>>, limit_position: i64, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of fragments as specified or the maximum position specified.
Use a fragment assembler to assemble messages which span multiple fragments.
§Parameters
-
handler
to which message fragments are delivered. -
clientd
to pass to the handler. -
limit_position
to consume messages up to. -
fragment_limit
for the number of fragments to be consumed during one polling operation.
§Return
the number of fragments that have been consumed or -1 for error.
sourcepub fn bounded_controlled_poll<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>(
&self,
handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>,
limit_position: i64,
fragment_limit: usize,
) -> Result<i32, AeronCError>
pub fn bounded_controlled_poll<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>( &self, handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>, limit_position: i64, fragment_limit: usize, ) -> Result<i32, AeronCError>
Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of fragments as specified or the maximum position specified.
Use a controlled fragment assembler to assemble messages which span multiple fragments.
§Parameters
-
handler
to which message fragments are delivered. -
clientd
to pass to the handler. -
limit_position
to consume messages up to. -
fragment_limit
for the number of fragments to be consumed during one polling operation.
§Return
the number of fragments that have been consumed or -1 for error.
sourcepub fn controlled_peek<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>(
&self,
initial_position: i64,
handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>,
limit_position: i64,
) -> i64
pub fn controlled_peek<AeronControlledFragmentHandlerHandlerImpl: AeronControlledFragmentHandlerCallback>( &self, initial_position: i64, handler: Option<&Handler<AeronControlledFragmentHandlerHandlerImpl>>, limit_position: i64, ) -> i64
Peek for new messages in a stream by scanning forward from an initial position. If new messages are found then they will be delivered to the handler up to a limited position.
Use a controlled fragment assembler to assemble messages which span multiple fragments. Scans must also start at the beginning of a message so that the assembler is reset.
§Parameters
-
initial_position
from which to peek forward. -
handler
to which message fragments are delivered. -
clientd
to pass to the handler. -
limit_position
up to which can be scanned.
§Return
the resulting position after the scan terminates which is a complete message or -1 for error.
sourcepub fn block_poll<AeronBlockHandlerHandlerImpl: AeronBlockHandlerCallback>(
&self,
handler: Option<&Handler<AeronBlockHandlerHandlerImpl>>,
block_length_limit: usize,
) -> Result<i32, AeronCError>
pub fn block_poll<AeronBlockHandlerHandlerImpl: AeronBlockHandlerCallback>( &self, handler: Option<&Handler<AeronBlockHandlerHandlerImpl>>, block_length_limit: usize, ) -> Result<i32, AeronCError>
Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of bytes.
A scan will terminate if a padding frame is encountered. If first frame in a scan is padding then a block for the padding is notified. If the padding comes after the first frame in a scan then the scan terminates at the offset the padding frame begins. Padding frames are delivered singularly in a block.
Padding frames may be for a greater range than the limit offset but only the header needs to be valid so relevant length of the frame is data header length.
§Parameters
-
handler
to which block is delivered. -
clientd
to pass to the handler. -
block_length_limit
up to which a block may be in length.
§Return
the number of bytes that have been consumed or -1 for error.
pub fn is_closed(&self) -> bool
sourcepub fn reject(&self, reason: &str) -> Result<i32, AeronCError>
pub fn reject(&self, reason: &str) -> Result<i32, AeronCError>
Force the driver to disconnect this image from the remote publication.
§Parameters
reason
an error message to be forwarded back to the publication.
pub fn get_inner(&self) -> *mut aeron_image_t
Trait Implementations§
source§impl Clone for AeronImage
impl Clone for AeronImage
source§fn clone(&self) -> AeronImage
fn clone(&self) -> AeronImage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AeronImage
impl Debug for AeronImage
source§impl Deref for AeronImage
impl Deref for AeronImage
source§impl From<&AeronImage> for *mut aeron_image_t
impl From<&AeronImage> for *mut aeron_image_t
source§fn from(value: &AeronImage) -> Self
fn from(value: &AeronImage) -> Self
source§impl From<*const aeron_image_stct> for AeronImage
impl From<*const aeron_image_stct> for AeronImage
source§fn from(value: *const aeron_image_t) -> Self
fn from(value: *const aeron_image_t) -> Self
source§impl From<*mut aeron_image_stct> for AeronImage
impl From<*mut aeron_image_stct> for AeronImage
source§fn from(value: *mut aeron_image_t) -> Self
fn from(value: *mut aeron_image_t) -> Self
source§impl From<AeronImage> for *mut aeron_image_t
impl From<AeronImage> for *mut aeron_image_t
source§fn from(value: AeronImage) -> Self
fn from(value: AeronImage) -> Self
source§impl From<AeronImage> for aeron_image_t
impl From<AeronImage> for aeron_image_t
source§fn from(value: AeronImage) -> Self
fn from(value: AeronImage) -> Self
source§impl From<aeron_image_stct> for AeronImage
impl From<aeron_image_stct> for AeronImage
source§fn from(value: aeron_image_t) -> Self
fn from(value: aeron_image_t) -> Self
Auto Trait Implementations§
impl Freeze for AeronImage
impl !RefUnwindSafe for AeronImage
impl !Send for AeronImage
impl !Sync for AeronImage
impl Unpin for AeronImage
impl !UnwindSafe for AeronImage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)