pub struct RawContext { /* private fields */ }Expand description
Owns and manages the set of active raw multicast publications.
Implementations§
Source§impl RawContext
impl RawContext
Sourcepub fn publication_count(&self) -> usize
pub fn publication_count(&self) -> usize
Returns the number of active raw publications.
Sourcepub fn contains_publication(&self, id: RawPublicationId) -> bool
pub fn contains_publication(&self, id: RawPublicationId) -> bool
Returns true if a raw publication with the given ID exists.
Sourcepub fn get_publication(&self, id: RawPublicationId) -> Option<&RawPublication>
pub fn get_publication(&self, id: RawPublicationId) -> Option<&RawPublication>
Returns the raw publication with the given ID, if present.
Sourcepub fn get_publication_mut(
&mut self,
id: RawPublicationId,
) -> Option<&mut RawPublication>
pub fn get_publication_mut( &mut self, id: RawPublicationId, ) -> Option<&mut RawPublication>
Returns the raw publication mutably with the given ID, if present.
Sourcepub fn add_publication(
&mut self,
config: RawPublicationConfig,
) -> Result<RawPublicationId, MctxError>
pub fn add_publication( &mut self, config: RawPublicationConfig, ) -> Result<RawPublicationId, MctxError>
Adds a new raw publication to the context.
Sourcepub fn remove_publication(&mut self, id: RawPublicationId) -> bool
pub fn remove_publication(&mut self, id: RawPublicationId) -> bool
Removes one raw publication and drops its socket.
Sourcepub fn take_publication(
&mut self,
id: RawPublicationId,
) -> Option<RawPublication>
pub fn take_publication( &mut self, id: RawPublicationId, ) -> Option<RawPublication>
Extracts one raw publication from the context.
Sourcepub fn send_raw(
&self,
id: RawPublicationId,
ip_datagram: &[u8],
) -> Result<RawSendReport, MctxError>
pub fn send_raw( &self, id: RawPublicationId, ip_datagram: &[u8], ) -> Result<RawSendReport, MctxError>
Sends one full IP datagram through the selected raw publication.
Trait Implementations§
Source§impl Debug for RawContext
impl Debug for RawContext
Source§impl Default for RawContext
impl Default for RawContext
Source§fn default() -> RawContext
fn default() -> RawContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RawContext
impl RefUnwindSafe for RawContext
impl Send for RawContext
impl Sync for RawContext
impl Unpin for RawContext
impl UnsafeUnpin for RawContext
impl UnwindSafe for RawContext
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