pub struct Ref<'a, T> { /* private fields */ }Expand description
A wrapper around a C object that belongs to the value it came from, such as the
context returned by archive.get_archive_context()
The lifetime ties it to that owner, so dropping or closing the owner while a Ref
is alive does not compile. Use it through Deref like the wrapper itself
The owner is tracked with PhantomData rather than an Rc/Arc clone for
performance: getters such as archive.aeron() are called on the hot path (for
example in do_work), and a reference count would add an increment and decrement
(atomic under multi-threaded) on every call. Ref holds only the C pointer, so
the borrow checker enforces the lifetime at zero runtime cost
ref.clone() keeps the lifetime. Cloning the inner wrapper (T::clone(&*r)) does
not, and that copy must not outlive the owner
Implementations§
Source§impl<'a> Ref<'a, AeronBroadcastTransmitter>
impl<'a> Ref<'a, AeronBroadcastTransmitter>
pub fn descriptor(&self) -> Ref<'a, AeronBroadcastDescriptor>
Source§impl<'a> Ref<'a, AeronCnc>
impl<'a> Ref<'a, AeronCnc>
Sourcepub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>
pub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>
Gets a counters reader for this command and control file. This does not need to be closed manually, resources are tied to the instance of aeron_cnc.
§Return
pointer to a counters reader.
Source§impl<'a> Ref<'a, AeronCountersManager>
impl<'a> Ref<'a, AeronCountersManager>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
Source§impl<'a> Ref<'a, AeronDataPacketDispatcher>
impl<'a> Ref<'a, AeronDataPacketDispatcher>
pub fn conductor_proxy(&self) -> Ref<'a, AeronDriverConductorProxy>
pub fn receiver(&self) -> Ref<'a, AeronDriverReceiver>
Source§impl<'a> Ref<'a, AeronDistinctErrorLogObservationList>
impl<'a> Ref<'a, AeronDistinctErrorLogObservationList>
pub fn observations(&self) -> Ref<'a, AeronDistinctObservation>
Source§impl<'a> Ref<'a, AeronDistinctErrorLog>
impl<'a> Ref<'a, AeronDistinctErrorLog>
pub fn observation_list(&self) -> Ref<'a, AeronDistinctErrorLogObservationList>
Source§impl<'a> Ref<'a, AeronDriverConductorClientCommand>
impl<'a> Ref<'a, AeronDriverConductorClientCommand>
Source§impl<'a> Ref<'a, AeronDriverConductorProxy>
impl<'a> Ref<'a, AeronDriverConductorProxy>
pub fn conductor(&self) -> Ref<'a, AeronDriverConductor>
pub fn command_queue(&self) -> Ref<'a, AeronMpscRb>
Source§impl<'a> Ref<'a, AeronDriverConductor>
impl<'a> Ref<'a, AeronDriverConductor>
pub fn context(&self) -> Ref<'a, AeronDriverContext>
pub fn client_command(&self) -> Ref<'a, AeronDriverConductorClientCommand>
pub fn driver_command(&self) -> Ref<'a, AeronDriverConductorDriverCommand>
Source§impl<'a> Ref<'a, AeronDriverContext>
impl<'a> Ref<'a, AeronDriverContext>
pub fn get_udp_channel_outgoing_interceptors( &self, ) -> Ref<'a, AeronUdpChannelInterceptorBindings>
pub fn get_udp_channel_incoming_interceptors( &self, ) -> Ref<'a, AeronUdpChannelInterceptorBindings>
pub fn get_conductor_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn get_sender_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn get_receiver_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn get_name_resolver_time_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn get_sender_port_manager(&self) -> Ref<'a, AeronPortManager>
pub fn get_receiver_port_manager(&self) -> Ref<'a, AeronPortManager>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
pub fn sender_cached_clock(&self) -> Ref<'a, AeronClockCache>
pub fn receiver_cached_clock(&self) -> Ref<'a, AeronClockCache>
pub fn conductor_proxy(&self) -> Ref<'a, AeronDriverConductorProxy>
pub fn native_resource_agent_proxy( &self, ) -> Ref<'a, AeronDriverNativeResourceAgentProxy>
pub fn sender_proxy(&self) -> Ref<'a, AeronDriverSenderProxy>
pub fn receiver_proxy(&self) -> Ref<'a, AeronDriverReceiverProxy>
pub fn counters_manager(&self) -> Ref<'a, AeronCountersManager>
pub fn system_counters(&self) -> Ref<'a, AeronSystemCounters>
pub fn error_log(&self) -> Ref<'a, AeronDistinctErrorLog>
pub fn udp_channel_outgoing_interceptor_bindings( &self, ) -> Ref<'a, AeronUdpChannelInterceptorBindings>
pub fn udp_channel_incoming_interceptor_bindings( &self, ) -> Ref<'a, AeronUdpChannelInterceptorBindings>
pub fn conductor_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn sender_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn receiver_duty_cycle_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn name_resolver_time_tracker(&self) -> Ref<'a, AeronDutyCycleTracker>
pub fn sender_port_manager(&self) -> Ref<'a, AeronPortManager>
pub fn receiver_port_manager(&self) -> Ref<'a, AeronPortManager>
pub fn dynamic_libs(&self) -> Ref<'a, AeronDlLoadedLibsState>
pub fn bindings_clientd_entries( &self, ) -> Ref<'a, AeronDriverContextBindingsClientdEntry>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdFreeLogBuffer>
impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdFreeLogBuffer>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdMapLogBuffer>
impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdMapLogBuffer>
pub fn result(&self) -> Ref<'a, AeronDriverNativeResourceAgentCommandResult>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdParseChannel>
impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdParseChannel>
pub fn async_parse(&self) -> Ref<'a, AeronUdpChannelAsyncParse>
pub fn result(&self) -> Ref<'a, AeronDriverNativeResourceAgentCommandResult>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdResolveAddress>
impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxyCmdResolveAddress>
pub fn result(&self) -> Ref<'a, AeronDriverNativeResourceAgentCommandResult>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxy>
impl<'a> Ref<'a, AeronDriverNativeResourceAgentProxy>
pub fn native_resource_agent(&self) -> Ref<'a, AeronDriverNativeResourceAgent>
pub fn command_queue(&self) -> Ref<'a, AeronSpscRb>
Source§impl<'a> Ref<'a, AeronDriverNativeResourceAgent>
impl<'a> Ref<'a, AeronDriverNativeResourceAgent>
pub fn context(&self) -> Ref<'a, AeronDriverContext>
Source§impl<'a> Ref<'a, AeronDriverReceiverImageEntry>
impl<'a> Ref<'a, AeronDriverReceiverImageEntry>
pub fn image(&self) -> Ref<'a, AeronPublicationImage>
Source§impl<'a> Ref<'a, AeronDriverReceiverPendingSetupEntry>
impl<'a> Ref<'a, AeronDriverReceiverPendingSetupEntry>
pub fn endpoint(&self) -> Ref<'a, AeronReceiveChannelEndpoint>
pub fn destination(&self) -> Ref<'a, AeronReceiveDestination>
Source§impl<'a> Ref<'a, AeronDriverReceiverProxy>
impl<'a> Ref<'a, AeronDriverReceiverProxy>
pub fn receiver(&self) -> Ref<'a, AeronDriverReceiver>
pub fn command_queue(&self) -> Ref<'a, AeronSpscRb>
Source§impl<'a> Ref<'a, AeronDriverReceiver>
impl<'a> Ref<'a, AeronDriverReceiver>
pub fn context(&self) -> Ref<'a, AeronDriverContext>
pub fn error_log(&self) -> Ref<'a, AeronDistinctErrorLog>
Source§impl<'a> Ref<'a, AeronDriverSenderNetworkPublicationEntry>
impl<'a> Ref<'a, AeronDriverSenderNetworkPublicationEntry>
pub fn publication(&self) -> Ref<'a, AeronNetworkPublication>
Source§impl<'a> Ref<'a, AeronDriverSenderProxy>
impl<'a> Ref<'a, AeronDriverSenderProxy>
pub fn sender(&self) -> Ref<'a, AeronDriverSender>
pub fn command_queue(&self) -> Ref<'a, AeronSpscRb>
Source§impl<'a> Ref<'a, AeronDriverSender>
impl<'a> Ref<'a, AeronDriverSender>
pub fn context(&self) -> Ref<'a, AeronDriverContext>
pub fn error_log(&self) -> Ref<'a, AeronDistinctErrorLog>
Source§impl<'a> Ref<'a, AeronDriver>
impl<'a> Ref<'a, AeronDriver>
pub fn context(&self) -> Ref<'a, AeronDriverContext>
Source§impl<'a> Ref<'a, AeronImageConstants>
impl<'a> Ref<'a, AeronImageConstants>
pub fn subscription(&self) -> Ref<'a, AeronSubscription>
Source§impl<'a> Ref<'a, AeronInt64ToTaggedPtrHashMap>
impl<'a> Ref<'a, AeronInt64ToTaggedPtrHashMap>
pub fn entries(&self) -> Ref<'a, AeronInt64ToTaggedPtrEntry>
Source§impl<'a> Ref<'a, AeronIpcPublicationEntry>
impl<'a> Ref<'a, AeronIpcPublicationEntry>
pub fn publication(&self) -> Ref<'a, AeronIpcPublication>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
Source§impl<'a> Ref<'a, AeronIpcPublication>
impl<'a> Ref<'a, AeronIpcPublication>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
pub fn log_meta_data(&self) -> Ref<'a, AeronLogbufferMetadata>
Source§impl<'a> Ref<'a, AeronLossDetector>
impl<'a> Ref<'a, AeronLossDetector>
pub fn feedback_delay_state(&self) -> Ref<'a, AeronFeedbackDelayGeneratorState>
Source§impl<'a> Ref<'a, AeronMpscRb>
impl<'a> Ref<'a, AeronMpscRb>
pub fn descriptor(&self) -> Ref<'a, AeronRbDescriptor>
Source§impl<'a> Ref<'a, AeronNetworkPublicationEntry>
impl<'a> Ref<'a, AeronNetworkPublicationEntry>
pub fn publication(&self) -> Ref<'a, AeronNetworkPublication>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
Source§impl<'a> Ref<'a, AeronNetworkPublication>
impl<'a> Ref<'a, AeronNetworkPublication>
pub fn endpoint(&self) -> Ref<'a, AeronSendChannelEndpoint>
pub fn flow_control(&self) -> Ref<'a, AeronFlowControlStrategy>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
pub fn log_meta_data(&self) -> Ref<'a, AeronLogbufferMetadata>
Source§impl<'a> Ref<'a, AeronPublicationImageConnection>
impl<'a> Ref<'a, AeronPublicationImageConnection>
pub fn destination(&self) -> Ref<'a, AeronReceiveDestination>
pub fn control_addr(&self) -> Ref<'a, SockaddrStorage>
Source§impl<'a> Ref<'a, AeronPublicationImageEntry>
impl<'a> Ref<'a, AeronPublicationImageEntry>
pub fn image(&self) -> Ref<'a, AeronPublicationImage>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
Source§impl<'a> Ref<'a, AeronPublicationImage>
impl<'a> Ref<'a, AeronPublicationImage>
pub fn endpoint(&self) -> Ref<'a, AeronReceiveChannelEndpoint>
pub fn congestion_control(&self) -> Ref<'a, AeronCongestionControlStrategy>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
pub fn mapped_raw_log(&self) -> Ref<'a, AeronMappedRawLog>
pub fn log_meta_data(&self) -> Ref<'a, AeronLogbufferMetadata>
Source§impl<'a> Ref<'a, AeronPublicationLink>
impl<'a> Ref<'a, AeronPublicationLink>
pub fn resource(&self) -> Ref<'a, AeronDriverManagedResource>
Source§impl<'a> Ref<'a, AeronReceiveChannelEndpointEntry>
impl<'a> Ref<'a, AeronReceiveChannelEndpointEntry>
pub fn endpoint(&self) -> Ref<'a, AeronReceiveChannelEndpoint>
Source§impl<'a> Ref<'a, AeronReceiveChannelEndpoint>
impl<'a> Ref<'a, AeronReceiveChannelEndpoint>
pub fn receiver_proxy(&self) -> Ref<'a, AeronDriverReceiverProxy>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
Source§impl<'a> Ref<'a, AeronReceiveDestinationEntry>
impl<'a> Ref<'a, AeronReceiveDestinationEntry>
pub fn destination(&self) -> Ref<'a, AeronReceiveDestination>
Source§impl<'a> Ref<'a, AeronReceiveDestination>
impl<'a> Ref<'a, AeronReceiveDestination>
pub fn data_paths(&self) -> Ref<'a, AeronUdpChannelDataPaths>
pub fn port_manager(&self) -> Ref<'a, AeronPortManager>
Source§impl<'a> Ref<'a, AeronRetransmitHandler>
impl<'a> Ref<'a, AeronRetransmitHandler>
pub fn retransmit_action_pool(&self) -> Ref<'a, AeronRetransmitAction>
Source§impl<'a> Ref<'a, AeronSendChannelEndpointEntry>
impl<'a> Ref<'a, AeronSendChannelEndpointEntry>
pub fn endpoint(&self) -> Ref<'a, AeronSendChannelEndpoint>
Source§impl<'a> Ref<'a, AeronSendChannelEndpoint>
impl<'a> Ref<'a, AeronSendChannelEndpoint>
pub fn destination_tracker(&self) -> Ref<'a, AeronUdpDestinationTracker>
pub fn sender_proxy(&self) -> Ref<'a, AeronDriverSenderProxy>
pub fn data_paths(&self) -> Ref<'a, AeronUdpChannelDataPaths>
pub fn port_manager(&self) -> Ref<'a, AeronPortManager>
pub fn cached_clock(&self) -> Ref<'a, AeronClockCache>
Source§impl<'a> Ref<'a, AeronSpscRb>
impl<'a> Ref<'a, AeronSpscRb>
pub fn descriptor(&self) -> Ref<'a, AeronRbDescriptor>
Source§impl<'a> Ref<'a, AeronStrToPtrHashMap>
impl<'a> Ref<'a, AeronStrToPtrHashMap>
pub fn keys(&self) -> Ref<'a, AeronStrToPtrHashMapKey>
Source§impl<'a> Ref<'a, AeronSubscribableListEntry>
impl<'a> Ref<'a, AeronSubscribableListEntry>
pub fn subscribable(&self) -> Ref<'a, AeronSubscribable>
Source§impl<'a> Ref<'a, AeronSubscribable>
impl<'a> Ref<'a, AeronSubscribable>
pub fn array(&self) -> Ref<'a, AeronTetherablePosition>
Source§impl<'a> Ref<'a, AeronSubscriptionLink>
impl<'a> Ref<'a, AeronSubscriptionLink>
pub fn endpoint(&self) -> Ref<'a, AeronReceiveChannelEndpoint>
pub fn spy_channel(&self) -> Ref<'a, AeronUdpChannel>
Source§impl<'a> Ref<'a, AeronSystemCounters>
impl<'a> Ref<'a, AeronSystemCounters>
pub fn manager(&self) -> Ref<'a, AeronCountersManager>
Source§impl<'a> Ref<'a, Aeron>
impl<'a> Ref<'a, Aeron>
Sourcepub fn context(&self) -> Ref<'a, AeronContext>
pub fn context(&self) -> Ref<'a, AeronContext>
Return the AeronContext that is in use by the given client.
§Return
the AeronContext for the given client or NULL for an error.
Sourcepub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>
pub fn counters_reader(&self) -> Ref<'a, AeronCountersReader>
Return a reference to the counters reader of the given client.
The AeronCountersReader is maintained by the client. And should not be freed.
§Return
AeronCountersReader or NULL for error.