pub struct Server { /* private fields */ }Expand description
Server is an instance of the TURN Server
Implementations§
Source§impl Server
impl Server
Sourcepub async fn new(config: ServerConfig) -> Result<Self, Error>
pub async fn new(config: ServerConfig) -> Result<Self, Error>
creates a new TURN server
Sourcepub async fn delete_allocations_by_username(
&self,
username: String,
) -> Result<(), Error>
pub async fn delete_allocations_by_username( &self, username: String, ) -> Result<(), Error>
Deletes all existing Allocations by the provided username.
Sourcepub async fn get_allocations_info(
&self,
five_tuples: Option<Vec<FiveTuple>>,
) -> Result<HashMap<FiveTuple, AllocationInfo>, Error>
pub async fn get_allocations_info( &self, five_tuples: Option<Vec<FiveTuple>>, ) -> Result<HashMap<FiveTuple, AllocationInfo>, Error>
Get information of Allocations by specified FiveTuples.
If five_tuples is:
None: It returns information about the allAllocations.Someand not empty: It returns information about theAllocations associated with the specified [FiveTuples].Some, but empty: It returns an emptyHashMap.
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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