Struct tvix_build::proto::build_request::BuildConstraints
source · pub struct BuildConstraints {
pub system: String,
pub min_memory: u64,
pub available_ro_paths: Vec<String>,
pub network_access: bool,
pub provide_bin_sh: bool,
}
Expand description
BuildConstraints represents certain conditions that must be fulfilled inside the build environment to be able to build this. Constraints can be things like required architecture and minimum amount of memory. The required input paths are not represented in here, because it wouldn’t be hermetic enough - see the comment around inputs too.
Fields§
§system: String
The system that’s needed to execute the build. Must not be empty.
min_memory: u64
The amount of memory required to be available for the build, in bytes.
available_ro_paths: Vec<String>
A list of (absolute) paths that need to be available in the build
environment, like /dev/kvm
.
This is distinct from the castore nodes in inputs.
TODO: check if these should be individual constraints instead.
These MUST be clean absolute paths, without any “.”, “..”, or superfluous
slashes, and sorted.
network_access: bool
Whether the build should be able to access the network,
provide_bin_sh: bool
Whether to provide a /bin/sh inside the build environment, usually a static bash.
Trait Implementations§
source§impl Clone for BuildConstraints
impl Clone for BuildConstraints
source§fn clone(&self) -> BuildConstraints
fn clone(&self) -> BuildConstraints
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BuildConstraints
impl Debug for BuildConstraints
source§impl Default for BuildConstraints
impl Default for BuildConstraints
source§impl Message for BuildConstraints
impl Message for BuildConstraints
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BuildConstraints
impl PartialEq for BuildConstraints
source§impl TryFrom<BuildConstraints> for HashSet<BuildConstraints>
impl TryFrom<BuildConstraints> for HashSet<BuildConstraints>
source§type Error = ValidateBuildConstraintsError
type Error = ValidateBuildConstraintsError
impl StructuralPartialEq for BuildConstraints
Auto Trait Implementations§
impl Freeze for BuildConstraints
impl RefUnwindSafe for BuildConstraints
impl Send for BuildConstraints
impl Sync for BuildConstraints
impl Unpin for BuildConstraints
impl UnwindSafe for BuildConstraints
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request