silk.build.parameter.

Typed package parameters resolved by the build graph.

Import as Parameter with import silk.build.parameter { Parameter }.

Public declarations: 2.

Parameter#

silk
pub interface Parameter

A value admitted as a package parameter: text, boolean, fixed-width integer, enum, option, list, or a record of those values. An empty implementation derives an enum or a record's public fields. Records and enums also implement Schema so deferred values can be cached and restored.

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Encodes the value without losing its nominal enum identity, integer precision, or optional layers.

Implementation Parameter for bool#

silk
impl Parameter for bool

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for String#

silk
impl Parameter for String

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for Option<T>#

silk
impl<T: Parameter> Parameter for Option<T>

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for List<T>#

silk
impl<T: Parameter> Parameter for List<T>

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for i8#

silk
impl Parameter for i8

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for i16#

silk
impl Parameter for i16

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for i32#

silk
impl Parameter for i32

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for i64#

silk
impl Parameter for i64

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for u8#

silk
impl Parameter for u8

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for u16#

silk
impl Parameter for u16

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for u32#

silk
impl Parameter for u32

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

Implementation Parameter for u64#

silk
impl Parameter for u64

Operation parameter#

silk
effect fn parameter(self: &Self) -> ParameterValue
    ! StepFailure
    ? &mut Allocator

deferred#

silk
pub effect fn deferred<T: Schema + Parameter + Transferable + 'static>(
  value: Deferred<T>,
) -> Deferred<ParameterValue>
  ! StepFailure
  ? &mut Allocator

Preserves the producer dependency while encoding the parameter only when the graph runs.

Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.

View the source of this page