fn wrap_libusb_context(libusb_context: *mut libusb_context) -> Result<Self, AllocError>
	{
		let slice = Global.allocate(Self::layout())?;
		let inner: NonNull<ContextInner> = slice.as_non_null_ptr().cast();
		
		unsafe
		{
			inner.as_ptr().write
			(
				ContextInner
				{
					libusb_context,
					
					reference_count: AtomicUsize::new(ContextInner::MinimumReferenceCount)
				}
			)
		};
		
		Ok(Self(inner))
	}
/// `libusb_context` will NOT have been initialized if it is the default (null) context.
/// `libusb_context` will have been initialized if it is the default (null) context.
`libusb_context` will NOT have been initialized if it is the default (null) context.
`libusb_context` will have been initialized if it is the default (null) context.
` libusb_context ` will NOT have been initialized if it is the default ( null ) context . ` libusb_context ` will have been initialized if it is the default ( null ) context .
fn wrap_libusb_context(libusb_context: *mut libusb_context) -> Result<Self, AllocError>
	{
		let slice = Global.allocate(Self::layout())?;
		let inner: NonNull<ContextInner> = slice.as_non_null_ptr().cast();
		unsafe
		{
			inner.as_ptr().write
			(
				ContextInner
				{
					libusb_context,
					reference_count: AtomicUsize::new(ContextInner::MinimumReferenceCount)
				}
			)
		};
		Ok(Self(inner))
	}
fn wrap_libusb_context ( libusb_context : * mut libusb_context ) -> Result < Self , AllocError > { let slice = Global . allocate ( Self :: layout ( ) ) ? ; let inner : NonNull < ContextInner > = slice . as_non_null_ptr ( ) . cast ( ) ; unsafe { inner . as_ptr ( ) . write ( ContextInner { libusb_context , reference_count : AtomicUsize :: new ( ContextInner :: MinimumReferenceCount ) } ) } ; Ok ( Self ( inner ) ) }
`libusb_context` will NOT have been initialized if it is the default (null) context.
` libusb_context ` will NOT have been initialized if it is the default ( null ) context .
libusb_context
*mut libusb_context
libusb_context
*mut libusb_context