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