pub struct PointerDefBuilder { /* private fields */ }
Expand description
Builder for creating a PointerDef
.
Implementations§
Source§impl PointerDefBuilder
impl PointerDefBuilder
Sourcepub const fn vtable(self, vtable: &'static PointerVTable) -> Self
pub const fn vtable(self, vtable: &'static PointerVTable) -> Self
Sets the vtable for the pointer.
Sourcepub const fn pointee(self, pointee: fn() -> &'static Shape) -> Self
pub const fn pointee(self, pointee: fn() -> &'static Shape) -> Self
Sets the shape of the inner type of the pointer.
Sourcepub const fn flags(self, flags: PointerFlags) -> Self
pub const fn flags(self, flags: PointerFlags) -> Self
Sets the flags for the pointer.
Sourcepub const fn known(self, known: KnownPointer) -> Self
pub const fn known(self, known: KnownPointer) -> Self
Sets the known pointer type.
Sourcepub const fn weak(self, weak: fn() -> &'static Shape) -> Self
pub const fn weak(self, weak: fn() -> &'static Shape) -> Self
Sets the shape of the corresponding weak pointer, if this pointer is strong.
Sourcepub const fn strong(self, strong: fn() -> &'static Shape) -> Self
pub const fn strong(self, strong: fn() -> &'static Shape) -> Self
Sets the shape of the corresponding strong pointer, if this pointer is weak
Sourcepub const fn build(self) -> PointerDef
pub const fn build(self) -> PointerDef
Builds a PointerDef
from the provided configuration.
§Panics
Panics if any required field (vtable, flags) is not set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PointerDefBuilder
impl RefUnwindSafe for PointerDefBuilder
impl Send for PointerDefBuilder
impl Sync for PointerDefBuilder
impl Unpin for PointerDefBuilder
impl UnwindSafe for PointerDefBuilder
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