pub struct Event(/* private fields */);Expand description
Wrapper around FreeSWITCH event.
Implementations§
Source§impl Event
impl Event
Sourcepub fn reserve_subclass(name: &CStr) -> Result<()>
pub fn reserve_subclass(name: &CStr) -> Result<()>
Reserve a subclass name for private use with a custom event. See: switch_event_reserve_subclass_detailed.
Sourcepub fn free_subclass(name: &CStr) -> Result<()>
pub fn free_subclass(name: &CStr) -> Result<()>
Free a subclass name reserved for private use with a custom event. See: switch_event_free_subclass_detailed.
Sourcepub fn new_custom_event(subclass: &CStr) -> Result<Self>
pub fn new_custom_event(subclass: &CStr) -> Result<Self>
Create a new custom event with the given subclass name.
Sourcepub fn new_core_event(
event: switch_event_types_t,
subclass: Option<&CStr>,
) -> Result<Self>
pub fn new_core_event( event: switch_event_types_t, subclass: Option<&CStr>, ) -> Result<Self>
Create an event. See: switch_event_create_subclass_detailed.
Source§impl Event
impl Event
Sourcepub fn set_channel_data(&mut self, channel: &Channel<'_>)
pub fn set_channel_data(&mut self, channel: &Channel<'_>)
Add information about a given channel to an event object. See: switch_channel_event_set_data.
Sourcepub fn set_body<T>(&mut self, body: T) -> Result<()>
pub fn set_body<T>(&mut self, body: T) -> Result<()>
Set the body of an event. See: switch_event_set_body.
Sourcepub fn fire(self) -> Result<()>
pub fn fire(self) -> Result<()>
Fire an event. See: switch_event_fire_detailed.
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl !Send for Event
impl !Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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