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: SetupEmission, requires_management_permissions: bool, runtime_cleanup_before_teardown: 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
Sourcepub const fn should_emit_in_setup(self, lifecycle: ResourceLifecycle) -> bool
pub const fn should_emit_in_setup(self, lifecycle: ResourceLifecycle) -> bool
Whether setup owns this resource: it creates it, and no runtime controller will.
Gating, lifecycle checks and permission compilation ask this. A Live sandbox answers
false here and true from Self::emits_setup_scaffolding; answering the two with
one predicate classifies it as setup-created, which keeps its gate out of the runtime
strip and builds the image for a deployer who declined it.
Sourcepub const fn emits_setup_scaffolding(self, lifecycle: ResourceLifecycle) -> bool
pub const fn emits_setup_scaffolding(self, lifecycle: ResourceLifecycle) -> bool
Whether the setup artifact renders anything for this resource, its own scaffolding included — a Live sandbox’s build role, which its controller may pass but not create.
The generators and registration’s expected set ask this, and must agree: registration refuses a payload naming a resource setup does not emit, and one missing a resource it does, so a disagreement fails every install after the stack has already completed.
pub const fn requires_management_permissions(self) -> bool
pub const fn has_runtime_cleanup_before_teardown(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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResourceOwnershipPolicy
Source§impl Debug for ResourceOwnershipPolicy
impl Debug for ResourceOwnershipPolicy
impl Eq for ResourceOwnershipPolicy
Source§impl PartialEq for ResourceOwnershipPolicy
impl PartialEq 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.