pub struct PerformanceConfig {
pub profile: String,
pub capacity: Option<usize>,
pub signaling_only_rtp_port: Option<u16>,
pub recipe_path: Option<PathBuf>,
}Expand description
Parameterized performance recipe selection.
profile is resolved from a YAML recipe book. When recipe_path is
omitted, rvoip-sip uses its bundled default recipe book. When recipe_path
is set, that YAML file is loaded instead.
Fields§
§profile: StringRecipe name from the selected YAML recipe book.
capacity: Option<usize>Expected burst or active-call capacity for capacity-driven recipes.
signaling_only_rtp_port: Option<u16>SDP RTP port used by signaling-only recipes.
recipe_path: Option<PathBuf>Optional YAML recipe book path.
Implementations§
Source§impl PerformanceConfig
impl PerformanceConfig
Sourcepub fn profile(profile: impl Into<String>) -> Self
pub fn profile(profile: impl Into<String>) -> Self
Create a performance config for a named recipe profile.
Sourcepub fn pbx_media_server(capacity: usize) -> Self
pub fn pbx_media_server(capacity: usize) -> Self
PBX-style media server recipe.
Sourcepub fn signaling_only_server_high_performance(capacity: usize) -> Self
pub fn signaling_only_server_high_performance(capacity: usize) -> Self
High-performance signaling-only server recipe.
Sourcepub fn with_capacity(self, capacity: usize) -> Self
pub fn with_capacity(self, capacity: usize) -> Self
Set the capacity parameter.
Sourcepub fn with_signaling_only_rtp_port(self, port: u16) -> Self
pub fn with_signaling_only_rtp_port(self, port: u16) -> Self
Set the signaling-only SDP RTP port parameter.
Sourcepub fn with_recipe_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_recipe_path(self, path: impl Into<PathBuf>) -> Self
Load recipes from this YAML path instead of the bundled default book.
Trait Implementations§
Source§impl Clone for PerformanceConfig
impl Clone for PerformanceConfig
Source§fn clone(&self) -> PerformanceConfig
fn clone(&self) -> PerformanceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PerformanceConfig
impl Debug for PerformanceConfig
Source§impl<'de> Deserialize<'de> for PerformanceConfig
impl<'de> Deserialize<'de> for PerformanceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PerformanceConfig
impl RefUnwindSafe for PerformanceConfig
impl Send for PerformanceConfig
impl Sync for PerformanceConfig
impl Unpin for PerformanceConfig
impl UnsafeUnpin for PerformanceConfig
impl UnwindSafe for PerformanceConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more