pub struct EndpointBuilder { /* private fields */ }Expand description
SIP Endpoint Builder
EndpointBuilder provides a fluent interface for constructing SIP endpoints
with custom configuration. It follows the builder pattern to allow flexible
endpoint configuration.
§Examples
use rsipstack::EndpointBuilder;
use std::time::Duration;
let endpoint = EndpointBuilder::new()
.with_user_agent("MyApp/1.0")
.with_timer_interval(Duration::from_millis(10))
.with_allows(vec![rsipstack::sip::Method::Invite, rsipstack::sip::Method::Bye])
.build();Implementations§
Source§impl EndpointBuilder
impl EndpointBuilder
pub fn new() -> Self
pub fn with_option(&mut self, option: EndpointOption) -> &mut Self
pub fn with_user_agent(&mut self, user_agent: &str) -> &mut Self
pub fn with_transport_layer( &mut self, transport_layer: TransportLayer, ) -> &mut Self
pub fn with_cancel_token( &mut self, cancel_token: CancellationToken, ) -> &mut Self
pub fn with_timer_interval(&mut self, timer_interval: Duration) -> &mut Self
pub fn with_allows(&mut self, allows: Vec<Method>) -> &mut Self
pub fn with_inspector( &mut self, inspector: Box<dyn MessageInspector>, ) -> &mut Self
pub fn with_target_locator( &mut self, locator: Box<dyn TargetLocator>, ) -> &mut Self
pub fn with_transport_inspector( &mut self, inspector: Box<dyn TransportEventInspector>, ) -> &mut Self
pub fn with_domain_resolver( &mut self, resolver: Box<dyn DomainResolver>, ) -> &mut Self
pub fn build(&mut self) -> Endpoint
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EndpointBuilder
impl !UnwindSafe for EndpointBuilder
impl Freeze for EndpointBuilder
impl Send for EndpointBuilder
impl Sync for EndpointBuilder
impl Unpin for EndpointBuilder
impl UnsafeUnpin for EndpointBuilder
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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