blob: eefa23935f04c930c572e4177dc15f77e0c3dab5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use std::marker::PhantomData;
/// A token signifying a OpenGL object is currently bound.
pub struct CurrentlyBound<'token, Object>
{
_token: PhantomData<&'token Object>,
}
impl<'token, Object> CurrentlyBound<'token, Object>
{
/// Returns a new `CurrentlyBound`.
///
/// # Safety
/// A object must actually be currently bound. Otherwise, UB can occur.
#[must_use]
pub unsafe fn new() -> Self
{
Self {
_token: PhantomData,
}
}
}
|