pub struct NetworkConnection { /* private fields */ }Expand description
Re-exports the corresponding SystemConfiguration wrappers.
Wraps SCNetworkConnectionRef.
Implementations§
Source§impl NetworkConnection
impl NetworkConnection
Sourcepub fn with_service_id(service_id: &str) -> Result<Self>
pub fn with_service_id(service_id: &str) -> Result<Self>
Wraps SCNetworkConnectionCreateWithServiceID.
Sourcepub fn with_service_id_and_callback<F>(
service_id: &str,
callback: F,
) -> Result<Self>
pub fn with_service_id_and_callback<F>( service_id: &str, callback: F, ) -> Result<Self>
Wraps SCNetworkConnectionCreateWithServiceID with an SCNetworkConnectionCallBack.
Sourcepub fn copy_user_preferences() -> Result<NetworkConnectionUserPreferences>
pub fn copy_user_preferences() -> Result<NetworkConnectionUserPreferences>
Wraps SCNetworkConnectionCopyUserPreferences.
Sourcepub fn service_id(&self) -> Result<Option<String>>
pub fn service_id(&self) -> Result<Option<String>>
Wraps SCNetworkConnectionCopyServiceID.
Sourcepub fn status(&self) -> NetworkConnectionStatus
pub fn status(&self) -> NetworkConnectionStatus
Wraps SCNetworkConnectionGetStatus.
Sourcepub fn extended_status(&self) -> Option<PropertyList>
pub fn extended_status(&self) -> Option<PropertyList>
Wraps SCNetworkConnectionCopyExtendedStatus.
Sourcepub fn statistics(&self) -> Option<PropertyList>
pub fn statistics(&self) -> Option<PropertyList>
Wraps SCNetworkConnectionCopyStatistics.
Sourcepub fn user_options(&self) -> Option<PropertyList>
pub fn user_options(&self) -> Option<PropertyList>
Wraps SCNetworkConnectionCopyUserOptions.
Sourcepub fn start(
&self,
user_options: Option<&PropertyList>,
linger: bool,
) -> Result<()>
pub fn start( &self, user_options: Option<&PropertyList>, linger: bool, ) -> Result<()>
Wraps SCNetworkConnectionStart.
Sourcepub fn schedule_with_run_loop_current(&self) -> Result<()>
pub fn schedule_with_run_loop_current(&self) -> Result<()>
Wraps SCNetworkConnectionScheduleWithRunLoopCurrent.
Sourcepub fn unschedule_from_run_loop_current(&self) -> Result<()>
pub fn unschedule_from_run_loop_current(&self) -> Result<()>
Wraps SCNetworkConnectionUnscheduleFromRunLoopCurrent.
Sourcepub fn set_dispatch_queue_global(&self) -> Result<()>
pub fn set_dispatch_queue_global(&self) -> Result<()>
Wraps SCNetworkConnectionSetDispatchQueueGlobal.
Sourcepub fn clear_dispatch_queue(&self) -> Result<()>
pub fn clear_dispatch_queue(&self) -> Result<()>
Wraps SCNetworkConnectionClearDispatchQueue.
Trait Implementations§
Source§impl Clone for NetworkConnection
impl Clone for NetworkConnection
Source§fn clone(&self) -> NetworkConnection
fn clone(&self) -> NetworkConnection
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 moreAuto Trait Implementations§
impl Freeze for NetworkConnection
impl RefUnwindSafe for NetworkConnection
impl !Send for NetworkConnection
impl !Sync for NetworkConnection
impl Unpin for NetworkConnection
impl UnsafeUnpin for NetworkConnection
impl UnwindSafe for NetworkConnection
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