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: StringThe system that’s needed to execute the build. Must not be empty.
min_memory: u64The 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: boolWhether the build should be able to access the network,
provide_bin_sh: boolWhether 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§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