pub struct GnsGlobal(_);
Expand description
This is an empty type used to wrap the initialization/destruction of the low-level GameNetworkingSockets. On construction
Implementations
sourceimpl GnsGlobal
impl GnsGlobal
sourcepub fn get() -> Result<Self, String>
pub fn get() -> Result<Self, String>
Try to acquire the GnsGlobal
instance.
This function will succeed only if there is no instance already created.
The result might be dropped/recreated safely though.
If successful, a call to sys::GameNetworkingSockets_Init
has been made.
Note that the drop implementation ensure that sys::GameNetworkingSockets_Kill
is called.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GnsGlobal
impl Send for GnsGlobal
impl Sync for GnsGlobal
impl Unpin for GnsGlobal
impl UnwindSafe for GnsGlobal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more