pub struct USubscriptionConfiguration {
pub authority_name: String,
pub subscription_command_buffer: usize,
pub notification_command_buffer: usize,
}Fields§
§subscription_command_buffer: usize§notification_command_buffer: usizeImplementations§
Source§impl USubscriptionConfiguration
Holder object for USubscription configuration options; this performs validation of configuration parameters at construction time,
and also acts as a LocalUriProvider for an USubscription service based on the given authority name.
impl USubscriptionConfiguration
Holder object for USubscription configuration options; this performs validation of configuration parameters at construction time,
and also acts as a LocalUriProvider for an USubscription service based on the given authority name.
Sourcepub fn create(
authority_name: String,
subscription_command_buffer: Option<usize>,
notification_command_buffer: Option<usize>,
) -> Result<Arc<USubscriptionConfiguration>, ConfigurationError>
pub fn create( authority_name: String, subscription_command_buffer: Option<usize>, notification_command_buffer: Option<usize>, ) -> Result<Arc<USubscriptionConfiguration>, ConfigurationError>
Create an “immutable” (Arc) USubscriptionConfiguration object from a set of configuration parameters.
Note: the default internal command channel buffer size is DEFAULT_COMMAND_BUFFER_SIZE = 1024
§Arguments
authority_name- Authority part of UUri that this USubscription instance is reachable onsubscription_command_buffer- buffer size for subscription manager commands, defaults to DEFAULT_COMMAND_BUFFER_SIZE whenNoneor 0 is passednotification_command_buffer- buffer size for notification manager commands, defaults to DEFAULT_COMMAND_BUFFER_SIZE whenNoneor 0 is passed
§Errors
Returns a ConfigurationError in case an invalid Authority string is provided; this is determined via the uriparse crate Authority::try_from() method.
Trait Implementations§
Source§impl Clone for USubscriptionConfiguration
impl Clone for USubscriptionConfiguration
Source§fn clone(&self) -> USubscriptionConfiguration
fn clone(&self) -> USubscriptionConfiguration
Returns a duplicate 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 USubscriptionConfiguration
impl Debug for USubscriptionConfiguration
Source§impl LocalUriProvider for USubscriptionConfiguration
impl LocalUriProvider for USubscriptionConfiguration
Gets the authority used for URIs representing this uEntity’s resources.
Source§fn get_resource_uri(&self, resource_id: u16) -> UUri
fn get_resource_uri(&self, resource_id: u16) -> UUri
Gets a URI that represents a given resource of this uEntity.
Source§fn get_source_uri(&self) -> UUri
fn get_source_uri(&self) -> UUri
Gets the URI that represents the resource that this uEntity expects
RPC responses and notifications to be sent to.
Auto Trait Implementations§
impl Freeze for USubscriptionConfiguration
impl RefUnwindSafe for USubscriptionConfiguration
impl Send for USubscriptionConfiguration
impl Sync for USubscriptionConfiguration
impl Unpin for USubscriptionConfiguration
impl UnwindSafe for USubscriptionConfiguration
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