pub struct ResourceOwnershipPolicy { /* private fields */ }Implementations§
Source§impl ResourceOwnershipPolicy
impl ResourceOwnershipPolicy
pub const fn new( default_lifecycle: ResourceLifecycle, allow_frozen: bool, allow_live: bool, emit_in_setup: bool, frozen_management: bool, ) -> Self
pub const fn default_lifecycle(self) -> ResourceLifecycle
pub const fn allows_frozen(self) -> bool
pub const fn allows_live(self) -> bool
pub const fn allows_lifecycle(self, lifecycle: ResourceLifecycle) -> bool
pub const fn should_emit_in_setup(self, lifecycle: ResourceLifecycle) -> bool
pub const fn frozen_requires_management(self) -> bool
pub fn allowed_lifecycles(self) -> &'static str
Trait Implementations§
Source§impl Clone for ResourceOwnershipPolicy
impl Clone for ResourceOwnershipPolicy
Source§fn clone(&self) -> ResourceOwnershipPolicy
fn clone(&self) -> ResourceOwnershipPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceOwnershipPolicy
impl Debug for ResourceOwnershipPolicy
Source§impl PartialEq for ResourceOwnershipPolicy
impl PartialEq for ResourceOwnershipPolicy
Source§fn eq(&self, other: &ResourceOwnershipPolicy) -> bool
fn eq(&self, other: &ResourceOwnershipPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ResourceOwnershipPolicy
impl Eq for ResourceOwnershipPolicy
impl StructuralPartialEq for ResourceOwnershipPolicy
Auto Trait Implementations§
impl Freeze for ResourceOwnershipPolicy
impl RefUnwindSafe for ResourceOwnershipPolicy
impl Send for ResourceOwnershipPolicy
impl Sync for ResourceOwnershipPolicy
impl Unpin for ResourceOwnershipPolicy
impl UnsafeUnpin for ResourceOwnershipPolicy
impl UnwindSafe for ResourceOwnershipPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.