pub struct AeronBroadcastReceiver { /* private fields */ }
Implementations§
Source§impl AeronBroadcastReceiver
impl AeronBroadcastReceiver
pub fn new( scratch_buffer: [u8; 4096], buffer: *mut u8, descriptor: &AeronBroadcastDescriptor, capacity: usize, mask: usize, record_offset: usize, cursor: i64, next_record: i64, lapped_count: c_long, ) -> Result<Self, AeronCError>
Sourcepub fn new_zeroed() -> Result<Self, AeronCError>
pub fn new_zeroed() -> Result<Self, AeronCError>
creates zeroed struct where the underlying c struct is on the heap
pub fn scratch_buffer(&self) -> [u8; 4096]
pub fn buffer(&self) -> *mut u8
pub fn descriptor(&self) -> AeronBroadcastDescriptor
pub fn capacity(&self) -> usize
pub fn mask(&self) -> usize
pub fn record_offset(&self) -> usize
pub fn cursor(&self) -> i64
pub fn next_record(&self) -> i64
pub fn lapped_count(&self) -> c_long
pub fn init( &self, buffer: *mut c_void, length: usize, ) -> Result<i32, AeronCError>
pub fn receive<AeronBroadcastReceiverHandlerHandlerImpl: AeronBroadcastReceiverHandlerCallback>( &self, handler: Option<&Handler<AeronBroadcastReceiverHandlerHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn receive_once<AeronBroadcastReceiverHandlerHandlerImpl: FnMut(i32, &mut [u8])>(
&self,
handler: AeronBroadcastReceiverHandlerHandlerImpl,
) -> Result<i32, AeronCError>
pub fn receive_once<AeronBroadcastReceiverHandlerHandlerImpl: FnMut(i32, &mut [u8])>( &self, handler: AeronBroadcastReceiverHandlerHandlerImpl, ) -> Result<i32, AeronCError>
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
pub fn get_inner(&self) -> *mut aeron_broadcast_receiver_t
Source§impl AeronBroadcastReceiver
impl AeronBroadcastReceiver
Sourcepub fn clone_struct(&self) -> Self
pub fn clone_struct(&self) -> Self
Regular clone just increases the reference count of underlying count.
clone_struct
shallow copies the content of the underlying struct on heap.
NOTE: if the struct has references to other structs these will not be copied
Must be only used on structs which has no init/clean up methods. So its danagerous to use with Aeron/AeronContext/AeronPublication/AeronSubscription More intended for AeronArchiveRecordingDescriptor
Source§impl AeronBroadcastReceiver
impl AeronBroadcastReceiver
pub fn buffer_mut(&self) -> &mut [u8] ⓘ
pub fn buffer_at_mut(&self, idx: usize, len: usize) -> &mut [u8] ⓘ
Source§impl AeronBroadcastReceiver
impl AeronBroadcastReceiver
pub fn from_slice(buffer: &mut [u8]) -> Result<Self, AeronCError>
Trait Implementations§
Source§impl Clone for AeronBroadcastReceiver
impl Clone for AeronBroadcastReceiver
Source§fn clone(&self) -> AeronBroadcastReceiver
fn clone(&self) -> AeronBroadcastReceiver
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AeronBroadcastReceiver
impl Debug for AeronBroadcastReceiver
Source§impl Default for AeronBroadcastReceiver
impl Default for AeronBroadcastReceiver
This will create an instance where the struct is zeroed, use with care
Source§impl Deref for AeronBroadcastReceiver
impl Deref for AeronBroadcastReceiver
Source§impl From<&AeronBroadcastReceiver> for *mut aeron_broadcast_receiver_t
impl From<&AeronBroadcastReceiver> for *mut aeron_broadcast_receiver_t
Source§fn from(value: &AeronBroadcastReceiver) -> Self
fn from(value: &AeronBroadcastReceiver) -> Self
Converts to this type from the input type.
Source§impl From<*const aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
impl From<*const aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
Source§fn from(value: *const aeron_broadcast_receiver_t) -> Self
fn from(value: *const aeron_broadcast_receiver_t) -> Self
Converts to this type from the input type.
Source§impl From<*mut aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
impl From<*mut aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
Source§fn from(value: *mut aeron_broadcast_receiver_t) -> Self
fn from(value: *mut aeron_broadcast_receiver_t) -> Self
Converts to this type from the input type.
Source§impl From<AeronBroadcastReceiver> for *mut aeron_broadcast_receiver_t
impl From<AeronBroadcastReceiver> for *mut aeron_broadcast_receiver_t
Source§fn from(value: AeronBroadcastReceiver) -> Self
fn from(value: AeronBroadcastReceiver) -> Self
Converts to this type from the input type.
Source§impl From<AeronBroadcastReceiver> for aeron_broadcast_receiver_t
impl From<AeronBroadcastReceiver> for aeron_broadcast_receiver_t
Source§fn from(value: AeronBroadcastReceiver) -> Self
fn from(value: AeronBroadcastReceiver) -> Self
Converts to this type from the input type.
Source§impl From<aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
impl From<aeron_broadcast_receiver_stct> for AeronBroadcastReceiver
Source§fn from(value: aeron_broadcast_receiver_t) -> Self
fn from(value: aeron_broadcast_receiver_t) -> Self
Converts to this type from the input type.
impl Send for AeronBroadcastReceiver
Auto Trait Implementations§
impl Freeze for AeronBroadcastReceiver
impl !RefUnwindSafe for AeronBroadcastReceiver
impl !Sync for AeronBroadcastReceiver
impl Unpin for AeronBroadcastReceiver
impl !UnwindSafe for AeronBroadcastReceiver
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