Skip to main content

SandboxBuilder

Struct SandboxBuilder 

Source
pub struct SandboxBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> SandboxBuilder<S>

Source

pub fn build(self) -> Sandbox
where S: IsComplete,

Finish building and return the requested object

Source

pub fn code(self, value: SandboxCode) -> SandboxBuilder<SetCode<S>>
where S::Code: IsUnset,

Required.

Where the sandbox’s root filesystem comes from

Source

pub fn private_base_image( self, value: String, ) -> SandboxBuilder<SetPrivateBaseImage<S>>
where S::PrivateBaseImage: IsUnset,

Optional (Some / Option setters). Private ECR base image an AWS build pulls; code.image names only the S3 bundle, so this is what the cross-account grant opens. Live only: the grant needs the customer account, which registration reports. Absent means the base image is pulled anonymously.

Source

pub fn maybe_private_base_image( self, value: Option<String>, ) -> SandboxBuilder<SetPrivateBaseImage<S>>
where S::PrivateBaseImage: IsUnset,

Optional (Some / Option setters). Private ECR base image an AWS build pulls; code.image names only the S3 bundle, so this is what the cross-account grant opens. Live only: the grant needs the customer account, which registration reports. Absent means the base image is pulled anonymously.

Source

pub fn limits(self, value: SandboxLimits) -> SandboxBuilder<SetLimits<S>>
where S::Limits: IsUnset,

Optional (Some / Option setters). Enforced resource ceilings.

Optional because not every platform can enforce them, and a declaration that names none takes the platform’s own defaults. Naming them on a platform that cannot enforce them is rejected at plan time rather than silently ignored.

Source

pub fn maybe_limits( self, value: Option<SandboxLimits>, ) -> SandboxBuilder<SetLimits<S>>
where S::Limits: IsUnset,

Optional (Some / Option setters). Enforced resource ceilings.

Optional because not every platform can enforce them, and a declaration that names none takes the platform’s own defaults. Naming them on a platform that cannot enforce them is rejected at plan time rather than silently ignored.

Source

pub fn egress(self, value: SandboxEgress) -> SandboxBuilder<SetEgress<S>>
where S::Egress: IsUnset,

Required.

Outbound network policy

Source

pub fn privileged_supervisor( self, value: SandboxPrivilegedSupervisor, ) -> SandboxBuilder<SetPrivilegedSupervisor<S>>
where S::PrivilegedSupervisor: IsUnset,

Optional (Some / Option setters). Have Alien’s agent install the declared egress policy before running any image code. Unsupported backends refuse this at plan time.

Source

pub fn maybe_privileged_supervisor( self, value: Option<SandboxPrivilegedSupervisor>, ) -> SandboxBuilder<SetPrivilegedSupervisor<S>>
where S::PrivilegedSupervisor: IsUnset,

Optional (Some / Option setters). Have Alien’s agent install the declared egress policy before running any image code. Unsupported backends refuse this at plan time.

Source

pub fn lifecycle( self, value: SandboxLifecyclePolicy, ) -> SandboxBuilder<SetLifecycle<S>>
where S::Lifecycle: IsUnset,

Required.

Sandbox lifetime ceiling and idle behaviour.

Stored state written before the rename calls this session. A stack state or release that old must stay readable, otherwise its deployment can no longer be updated or deleted.

Source

pub fn preview_ports( self, value: Vec<u16>, ) -> SandboxBuilder<SetPreviewPorts<S>>
where S::PreviewPorts: IsUnset,

Optional (Some / Option setters). Default: <Vec<u16> as Default>::default().

Ports eligible for a preview capability. An application reaches its sandbox through the provider, so it cannot widen its own ingress at runtime; a holder of a remote binding’s credentials is bounded by no port condition, which is why a remote sandbox declares none.

Source

pub fn maybe_preview_ports( self, value: Option<Vec<u16>>, ) -> SandboxBuilder<SetPreviewPorts<S>>
where S::PreviewPorts: IsUnset,

Optional (Some / Option setters). Default: <Vec<u16> as Default>::default().

Ports eligible for a preview capability. An application reaches its sandbox through the provider, so it cannot widen its own ingress at runtime; a holder of a remote binding’s credentials is bounded by no port condition, which is why a remote sandbox declares none.

Auto Trait Implementations§

§

impl<S> Freeze for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: Freeze,

§

impl<S> RefUnwindSafe for SandboxBuilder<S>

§

impl<S> Send for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: Send,

§

impl<S> Sync for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: Sync,

§

impl<S> Unpin for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: Unpin,

§

impl<S> UnsafeUnpin for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: UnsafeUnpin,

§

impl<S> UnwindSafe for SandboxBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<Sandbox>)>: UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more