Struct PWindow

Source
pub struct PWindow(/* private fields */);

Methods from Deref<Target = Window>§

Source

pub fn get_proc_address(&mut self, procname: &str) -> *const c_void

Returns the address of the specified client API or extension function if it is supported by the context associated with this Window. If this Window is not the current context, it will make it the current context.

Wrapper for glfwGetProcAddress.

Source

pub fn create_shared( &self, width: u32, height: u32, title: &str, mode: WindowMode<'_>, ) -> Option<(PWindow, GlfwReceiver<(f64, WindowEvent)>)>

Creates a new shared window.

Wrapper for glfwCreateWindow.

Source

pub fn render_context(&mut self) -> PRenderContext

Returns a render context that can be shared between tasks, allowing for concurrent rendering.

Source

pub fn should_close(&self) -> bool

Wrapper for glfwWindowShouldClose.

Examples found in repository?
examples/simple2d.rs (line 21)
8fn main() {
9    let mut el = EventLoop::new(600, 600);
10    let mut renderer = Renderer::new();
11
12    /* default projection type is perspective */
13    renderer.camera.set_projection(ProjectionType::Orthographic);
14    renderer.add_light(Light { position: vec3(0.0, 0.0, 1.0), color: Vec3::ONE })
15        .unwrap();
16
17    /* we'll represent our player using a quad */
18    let player_handle = renderer.add_mesh(Quad::new(Vec3::ONE * 0.1, Vec4::ONE).mesh())
19        .unwrap();
20
21    while !el.window.should_close() {
22        el.update();
23
24        /* we can modify the player by indexing into it in the renderer's meshes */
25        let player = &mut renderer.meshes[player_handle];
26        player.color = vec3(0.5, 0.0, el.time.sin());
27        move_player(&el, &mut player.position);
28    
29        renderer.camera.update(Vec3::ZERO, &el);
30    
31        let frame = el.ui.frame(&mut el.window);
32        frame.text("hello, world! this is imgui");
33
34        unsafe {
35            Clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT);
36            ClearColor(0.1, 0.2, 0.3, 1.0);
37            
38            renderer.draw();
39            el.ui.draw();
40        }
41    }
42}
More examples
Hide additional examples
examples/ik.rs (line 45)
7fn main() {
8    let mut el = EventLoop::new(600, 600);
9    let mut renderer = Renderer::new();
10
11    unsafe {
12        Enable(DEPTH_TEST);
13    }
14
15    /* default projection type is perspective */
16    renderer.camera.set_projection(ProjectionType::Orthographic);
17    renderer.add_light(Light { position: vec3(0.0, 0.0, 3.0), color: Vec3::ONE })
18        .unwrap();
19
20    /* we'll represent our player using a quad */
21    let player_handle = renderer.add_mesh(Quad::new(Vec3::ONE * 0.1, Vec4::ONE).mesh())
22        .unwrap();
23
24    renderer.meshes[player_handle].position = Vec3::Z * 2.0; // so the player stays in front of everything
25
26    let mut segments = vec![];
27    for _ in 0..128 {
28        let new_segment = Segment::new(vec3(0.0, 0.0, 0.0), 0.05, &mut renderer);
29
30        segments.push(new_segment);
31    }
32
33    renderer.meshes[segments[0].handle].hidden = true;
34    renderer.meshes[segments[segments.len()-1].handle].hidden = true;
35
36    renderer.meshes[player_handle].hidden = true;
37    
38
39    segments[0].pos = Vec3::new(-2.0, -2.0, 0.0);
40
41    let mut clamped_pos;
42    let mut player_vel;
43    let mut old_pos = Vec3::ZERO;
44
45    while !el.window.should_close() {
46        el.update();
47        renderer.update();
48        
49        segments.iter_mut().for_each(|s| {
50            s.update(&mut renderer);
51        });
52        
53        let player = &mut renderer.meshes[player_handle];
54        let mp = el.event_handler.mouse_pos / el.event_handler.width * 2.0;
55        let clamped_player_pos = {
56            // clamped_pos = lerp(clamped_pos, player.position, 0.1);
57            clamped_pos = player.position;
58
59            vec3(clamped_pos.x, clamped_pos.y, 0.0)
60        };
61        fabrik(&mut segments, {
62            if el.event_handler.lmb {
63                clamped_player_pos + vec3(mp.x, mp.y, 0.0)
64            } else {
65                clamped_player_pos
66            }
67        }, 0.0, 2);
68
69        let first_segment_position = segments[0].pos;
70        let seg_amm = segments.len() as f32;
71        let distance = first_segment_position.distance(segments[segments.len()-1].pos);
72        let len = segments[0].length;
73        if distance > segments.len() as f32 * segments[0].length + segments[0].length {
74            segments[0].pos += ((clamped_player_pos - first_segment_position) / seg_amm) * len * f32::powf(distance, 2.3);
75        }
76
77        player_vel = player.position - old_pos;
78        old_pos = player.position;
79
80        player.color = vec3(0.5, 0.0, el.time.sin());
81        move_player(&el, &mut player.position);
82    
83        renderer.camera.update(lerp(renderer.camera.pos, player.position, 0.125), &el);
84        renderer.camera.mouse_callback(el.event_handler.mouse_pos, &el.window);
85
86        let frame = el.ui.frame(&mut el.window);
87        frame.text("Hello, world! This is imgui.");
88        frame.text(format!("p: {:.1}\nv: {:.3}", player.position, player_vel));
89
90        unsafe {
91            Clear(COLOR_BUFFER_BIT | DEPTH_BUFFER_BIT);
92            ClearColor(0.1, 0.2, 0.3, 1.0);
93            
94            renderer.draw();
95            el.ui.draw();
96        }
97    }
98}
Source

pub fn set_should_close(&mut self, value: bool)

Wrapper for glfwSetWindowShouldClose.

Source

pub fn set_title(&mut self, title: &str)

Sets the title of the window.

Wrapper for glfwSetWindowTitle.

Source

pub fn get_pos(&self) -> (i32, i32)

Wrapper for glfwGetWindowPos.

Source

pub fn set_pos(&mut self, xpos: i32, ypos: i32)

Wrapper for glfwSetWindowPos.

Source

pub fn get_size(&self) -> (i32, i32)

Wrapper for glfwGetWindowSize.

Source

pub fn set_size(&mut self, width: i32, height: i32)

Wrapper for glfwSetWindowSize.

Source

pub fn get_frame_size(&self) -> (i32, i32, i32, i32)

Wrapper for glfwGetWindowFrameSize

Returns (left, top, right, bottom) edge window frame sizes, in screen coordinates.

Source

pub fn get_framebuffer_size(&self) -> (i32, i32)

Wrapper for glfwGetFramebufferSize.

Source

pub fn set_aspect_ratio(&mut self, numer: u32, denum: u32)

Wrapper for glfwSetWindowAspectRatio.

Source

pub fn set_size_limits( &mut self, minwidth: Option<u32>, minheight: Option<u32>, maxwidth: Option<u32>, maxheight: Option<u32>, )

Wrapper for glfwSetWindowSizeLimits.

A value of None is equivalent to GLFW_DONT_CARE. If minwidth or minheight are None, no minimum size is enforced. If maxwidth or maxheight are None, no maximum size is enforced.

Source

pub fn iconify(&mut self)

Wrapper for glfwIconifyWindow.

Source

pub fn restore(&mut self)

Wrapper for glfwRestoreWindow.

Source

pub fn maximize(&mut self)

Wrapper for glfwMaximizeWindow

Source

pub fn show(&mut self)

Wrapper for glfwShowWindow.

Source

pub fn hide(&mut self)

Wrapper for glfwHideWindow.

Source

pub fn with_window_mode<T, F>(&self, f: F) -> T
where F: FnOnce(WindowMode<'_>) -> T,

Returns whether the window is fullscreen or windowed.

§Example
window.with_window_mode(|mode| {
    match mode {
        glfw::Windowed => println!("Windowed"),
        glfw::FullScreen(m) => println!("FullScreen({})", m.get_name()),
    }
});
Source

pub fn set_monitor( &mut self, mode: WindowMode<'_>, xpos: i32, ypos: i32, width: u32, height: u32, refresh_rate: Option<u32>, )

Wrapper for glfwSetWindowMonitor

Source

pub fn focus(&mut self)

Wrapper for glfwFocusWindow

It is NOT recommended to use this function, as it steals focus from other applications and can be extremely disruptive to the user.

Source

pub fn is_focused(&self) -> bool

Wrapper for glfwGetWindowAttrib called with FOCUSED.

Source

pub fn is_iconified(&self) -> bool

Wrapper for glfwGetWindowAttrib called with ICONIFIED.

Source

pub fn is_maximized(&self) -> bool

Wrapper for glfwGetWindowattrib called with MAXIMIZED.

Source

pub fn get_client_api(&self) -> i32

Wrapper for glfwGetWindowAttrib called with CLIENT_API.

Source

pub fn get_context_version(&self) -> Version

Wrapper for glfwGetWindowAttrib called with CONTEXT_VERSION_MAJOR, CONTEXT_VERSION_MINOR and CONTEXT_REVISION.

§Returns

The client API version of the window’s context in a version struct.

Source

pub fn get_context_robustness(&self) -> i32

Wrapper for glfwGetWindowAttrib called with CONTEXT_ROBUSTNESS.

Source

pub fn is_opengl_forward_compat(&self) -> bool

Wrapper for glfwGetWindowAttrib called with OPENGL_FORWARD_COMPAT.

Source

pub fn is_opengl_debug_context(&self) -> bool

Wrapper for glfwGetWindowAttrib called with OPENGL_DEBUG_CONTEXT.

Source

pub fn get_opengl_profile(&self) -> i32

Wrapper for glfwGetWindowAttrib called with OPENGL_PROFILE.

Source

pub fn is_resizable(&self) -> bool

Wrapper for glfwGetWindowAttrib called with RESIZABLE.

Source

pub fn set_resizable(&mut self, resizable: bool)

Wrapper for glfwSetWindowAttrib called with RESIZABLE.

Source

pub fn is_visible(&self) -> bool

Wrapper for glfwGetWindowAttrib called with VISIBLE.

Source

pub fn is_decorated(&self) -> bool

Wrapper for glfwGetWindowAttrib called with DECORATED.

Source

pub fn set_decorated(&mut self, decorated: bool)

Wrapper for glfwSetWindowAttrib called with DECORATED.

Source

pub fn is_auto_iconify(&self) -> bool

Wrapper for glfwGetWindowAttrib called with AUTO_ICONIFY.

Source

pub fn set_auto_iconify(&mut self, auto_iconify: bool)

Wrapper for glfwSetWindowAttrib called with AUTO_ICONIFY.

Source

pub fn is_floating(&self) -> bool

Wrapper for glfwGetWindowAttrib called with FLOATING.

Source

pub fn set_floating(&mut self, floating: bool)

Wrapper for glfwSetWindowAttrib called with FLOATING.

Source

pub fn is_framebuffer_transparent(&self) -> bool

Wrapper for glfwGetWindowAttrib called with TRANSPARENT_FRAMEBUFFER.

Source

pub fn is_focus_on_show(&self) -> bool

Wrapper for glfwGetWindowAttrib called with FOCUS_ON_SHOW.

Source

pub fn set_focus_on_show(&mut self, focus_on_show: bool)

Wrapper for glfwSetWindowAttrib called with FOCUS_ON_SHOW.

Source

pub fn is_hovered(&self) -> bool

Wrapper for glfwGetWindowAttrib called with HOVERED.

Source

pub fn set_pos_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, i32, i32) + 'static,

Wrapper for glfwSetWindowPosCallback.

Source

pub fn unset_pos_callback(&mut self)

Wrapper for glfwSetWindowPosCallback.

Source

pub fn set_pos_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowPosCallback.

Source

pub fn set_size_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, i32, i32) + 'static,

Wrapper for glfwSetWindowSizeCallback.

Source

pub fn unset_size_callback(&mut self)

Wrapper for glfwSetWindowSizeCallback.

Source

pub fn set_size_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowSizeCallback.

Source

pub fn set_close_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window) + 'static,

Wrapper for glfwSetWindowCloseCallback.

Source

pub fn unset_close_callback(&mut self)

Wrapper for glfwSetWindowCloseCallback.

Source

pub fn set_close_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowCloseCallback.

Source

pub fn set_refresh_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window) + 'static,

Wrapper for glfwSetWindowRefreshCallback.

Source

pub fn unset_refresh_callback(&mut self)

Wrapper for glfwSetWindowRefreshCallback.

Source

pub fn set_refresh_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowRefreshCallback.

Source

pub fn set_focus_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, bool) + 'static,

Wrapper for glfwSetWindowFocusCallback.

Source

pub fn unset_focus_callback(&mut self)

Wrapper for glfwSetWindowFocusCallback.

Source

pub fn set_focus_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowFocusCallback.

Source

pub fn set_iconify_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, bool) + 'static,

Wrapper for glfwSetWindowIconifyCallback.

Source

pub fn unset_iconify_callback(&mut self)

Wrapper for glfwSetWindowIconifyCallback.

Source

pub fn set_iconify_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowIconifyCallback.

Source

pub fn set_framebuffer_size_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, i32, i32) + 'static,

Wrapper for glfwSetFramebufferSizeCallback.

Source

pub fn unset_framebuffer_size_callback(&mut self)

Wrapper for glfwSetFramebufferSizeCallback.

Source

pub fn set_framebuffer_size_polling(&mut self, should_poll: bool)

Wrapper for glfwSetFramebufferSizeCallback.

Source

pub fn set_key_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, Key, i32, Action, Modifiers) + 'static,

Wrapper for glfwSetKeyCallback.

Source

pub fn unset_key_callback(&mut self)

Wrapper for glfwSetKeyCallback.

Source

pub fn set_key_polling(&mut self, should_poll: bool)

Wrapper for glfwSetKeyCallback.

Source

pub fn set_char_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, char) + 'static,

Wrapper for glfwSetCharCallback.

Source

pub fn unset_char_callback(&mut self)

Wrapper for glfwSetCharCallback.

Source

pub fn set_char_polling(&mut self, should_poll: bool)

Wrapper for glfwSetCharCallback.

Source

pub fn set_char_mods_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, char, Modifiers) + 'static,

Wrapper for glfwSetCharModsCallback.

Source

pub fn unset_char_mods_callback(&mut self)

Wrapper for glfwSetCharModsCallback.

Source

pub fn set_char_mods_polling(&mut self, should_poll: bool)

Wrapper for glfwSetCharModsCallback.

Source

pub fn set_mouse_button_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, MouseButton, Action, Modifiers) + 'static,

Wrapper for glfwSetMouseButtonCallback.

Source

pub fn unset_mouse_button_callback(&mut self)

Wrapper for glfwSetMouseButtonCallback.

Source

pub fn set_mouse_button_polling(&mut self, should_poll: bool)

Wrapper for glfwSetMouseButtonCallback.

Source

pub fn set_cursor_pos_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, f64, f64) + 'static,

Wrapper for glfwSetCursorPosCallback.

Source

pub fn unset_cursor_pos_callback(&mut self)

Wrapper for glfwSetCursorPosCallback.

Source

pub fn set_cursor_pos_polling(&mut self, should_poll: bool)

Wrapper for glfwSetCursorPosCallback.

Source

pub fn set_cursor_enter_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, bool) + 'static,

Wrapper for glfwSetCursorEnterCallback.

Source

pub fn unset_cursor_enter_callback(&mut self)

Wrapper for glfwSetCursorEnterCallback.

Source

pub fn set_cursor_enter_polling(&mut self, should_poll: bool)

Wrapper for glfwSetCursorEnterCallback.

Source

pub fn set_scroll_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, f64, f64) + 'static,

Wrapper for glfwSetScrollCallback.

Source

pub fn unset_scroll_callback(&mut self)

Wrapper for glfwSetScrollCallback.

Source

pub fn set_scroll_polling(&mut self, should_poll: bool)

Wrapper for glfwSetScrollCallback.

Source

pub fn set_drag_and_drop_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, Vec<PathBuf>) + 'static,

Wrapper for glfwSetDropCallback.

Source

pub fn unset_drag_and_drop_callback(&mut self)

Wrapper for glfwSetDropCallback.

Source

pub fn set_drag_and_drop_polling(&mut self, should_poll: bool)

Wrapper for glfwSetDropCallback.

Source

pub fn set_maximize_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, bool) + 'static,

Wrapper for glfwSetWindowMaximizeCallback.

Source

pub fn unset_maximize_callback(&mut self)

Wrapper for glfwSetWindowMaximizeCallback.

Source

pub fn set_maximize_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowMaximizeCallback.

Source

pub fn set_content_scale_callback<T>(&mut self, callback: T)
where T: FnMut(&mut Window, f32, f32) + 'static,

Wrapper for glfwSetWindowContentScaleCallback.

Source

pub fn unset_content_scale_callback(&mut self)

Wrapper for glfwSetWindowContentScaleCallback.

Source

pub fn set_content_scale_polling(&mut self, should_poll: bool)

Wrapper for glfwSetWindowContentScaleCallback.

Source

pub fn set_all_polling(&mut self, should_poll: bool)

Starts or stops polling for all available events

Source

pub fn get_cursor_mode(&self) -> CursorMode

Wrapper for glfwGetInputMode called with CURSOR.

Source

pub fn set_cursor_mode(&mut self, mode: CursorMode)

Wrapper for glfwSetInputMode called with CURSOR.

Source

pub fn set_cursor(&mut self, cursor: Option<Cursor>) -> Option<Cursor>

Wrapper for glfwSetCursor using Cursor

The window will take ownership of the cursor, and will not Drop it until it is replaced or the window itself is destroyed.

Returns the previously set Cursor or None if no cursor was set.

Source

pub fn set_icon_from_pixels(&mut self, images: Vec<PixelImage>)

Sets the window icon via glfwSetWindowIcon from a set a set of vectors containing pixels in RGBA format (one pixel per 32-bit integer)

Source

pub fn has_sticky_keys(&self) -> bool

Wrapper for glfwGetInputMode called with STICKY_KEYS.

Source

pub fn set_sticky_keys(&mut self, value: bool)

Wrapper for glfwSetInputMode called with STICKY_KEYS.

Source

pub fn has_sticky_mouse_buttons(&self) -> bool

Wrapper for glfwGetInputMode called with STICKY_MOUSE_BUTTONS.

Source

pub fn set_sticky_mouse_buttons(&mut self, value: bool)

Wrapper for glfwSetInputMode called with STICKY_MOUSE_BUTTONS.

Source

pub fn does_store_lock_key_mods(&self) -> bool

Wrapper for glfwGetInputMode called with LOCK_KEY_MODS

Source

pub fn set_store_lock_key_mods(&mut self, value: bool)

Wrapper for glfwSetInputMode called with LOCK_KEY_MODS

Source

pub fn uses_raw_mouse_motion(&self) -> bool

Wrapper for glfwGetInputMode called with RAW_MOUSE_MOTION

Source

pub fn set_raw_mouse_motion(&mut self, value: bool)

Wrapper for glfwSetInputMode called with RAW_MOUSE_MOTION

Source

pub fn get_key(&self, key: Key) -> Action

Wrapper for glfwGetKey.

Source

pub fn get_mouse_button(&self, button: MouseButton) -> Action

Wrapper for glfwGetMouseButton.

Source

pub fn get_cursor_pos(&self) -> (f64, f64)

Wrapper for glfwGetCursorPos.

Source

pub fn set_cursor_pos(&mut self, xpos: f64, ypos: f64)

Wrapper for glfwSetCursorPos.

Source

pub fn set_clipboard_string(&mut self, string: &str)

Wrapper for glfwGetClipboardString.

Source

pub fn get_clipboard_string(&self) -> Option<String>

Wrapper for glfwGetClipboardString.

Source

pub fn get_opacity(&self) -> f32

Wrapper for glfwGetWindowOpacity.

Source

pub fn set_opacity(&mut self, opacity: f32)

Wrapper for glfwSetWindowOpacity.

Source

pub fn request_attention(&mut self)

Wrapper for glfwRequestWindowAttention.

Source

pub fn get_content_scale(&self) -> (f32, f32)

Wrapper for glfwGetWindowContentScale.

Source

pub fn get_x11_window(&self) -> *mut c_void

Wrapper for glfwGetX11Window

Source

pub fn get_glx_context(&self) -> *mut c_void

Wrapper for glfwGetGLXContext

Trait Implementations§

Source§

impl Debug for PWindow

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for PWindow

Source§

type Target = Window

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<PWindow as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for PWindow

Source§

fn deref_mut(&mut self) -> &mut <PWindow as Deref>::Target

Mutably dereferences the value.
Source§

impl HasDisplayHandle for PWindow

Source§

fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>

Get a handle to the display controller of the windowing system.
Source§

impl HasWindowHandle for PWindow

Source§

fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>

Get a handle to the window.
Source§

impl Send for PWindow

Source§

impl Sync for PWindow

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HasRawDisplayHandle for T
where T: HasDisplayHandle + ?Sized,

Source§

fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>

👎Deprecated: Use HasDisplayHandle instead
Source§

impl<T> HasRawWindowHandle for T
where T: HasWindowHandle + ?Sized,

Source§

fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>

👎Deprecated: Use HasWindowHandle instead
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V