pub struct Program { /* private fields */ }Implementations§
Source§impl Program
impl Program
pub fn new(binary: CompiledBinary) -> Self
pub fn from_bytecode(bytecode: &[u8]) -> Result<Self>
pub fn from_bytecode_file(path: impl AsRef<Path>) -> Result<Self>
pub fn to_bytecode(&self) -> Result<Vec<u8>>
pub fn save_bytecode(&self, path: impl AsRef<Path>) -> Result<()>
pub fn bytecode_summary(&self) -> Result<BytecodeSummary>
pub fn disassemble(&self) -> String
pub fn function_count(&self) -> usize
pub fn function_names(&self) -> impl Iterator<Item = &str>
pub fn total_instruction_count(&self) -> usize
pub fn total_register_count(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn summary(&self) -> ProgramSummary
pub fn client_io_manifest(&self) -> &ClientIoManifest
pub fn client_count(&self) -> usize
pub fn client_slots(&self) -> impl Iterator<Item = u64> + '_
pub fn total_client_input_count(&self) -> usize
pub fn total_client_output_count(&self) -> usize
pub fn minimum_expected_clients(&self) -> usize
pub fn has_client_io(&self) -> bool
Sourcepub fn has_client_input_metadata(&self) -> bool
pub fn has_client_input_metadata(&self) -> bool
Whether the program reads client INPUTS via ClientStore (as opposed to
only delivering client OUTPUTS via send_to_client). The local
named-input adapter synthesizes the input wrapper itself, so it can only
wrap programs that take their inputs as function parameters — i.e. those
with no client input metadata. Output-only client IO is fine and is
preserved through wrapping.
pub fn validate_expected_clients(&self, expected_clients: usize) -> Result<()>
pub fn validate_client_inputs(&self, inputs: &[(u64, &[Value])]) -> Result<()>
pub fn clients(&self) -> impl Iterator<Item = ClientMetadata<'_>>
pub fn client(&self, client_slot: u64) -> Option<ClientMetadata<'_>>
pub fn bytecode_backend(&self) -> MpcBackend
pub fn bytecode_curve(&self) -> MpcCurve
pub fn functions(&self) -> impl Iterator<Item = FunctionMetadata<'_>>
pub fn function(&self, name: &str) -> Option<FunctionMetadata<'_>>
pub fn main(&self) -> Option<FunctionMetadata<'_>>
pub fn binary(&self) -> &CompiledBinary
pub fn validate_function_inputs( &self, function_name: &str, inputs: &[(String, Value)], ) -> Result<()>
pub fn validate_function_args( &self, function_name: &str, args: &[Value], ) -> Result<()>
Trait Implementations§
Source§impl LoadableProgram for Program
impl LoadableProgram for Program
fn load_program(self) -> Result<Program>
Source§impl LoadableProgram for &Program
impl LoadableProgram for &Program
fn load_program(self) -> Result<Program>
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
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<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> ⓘ
Converts
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> ⓘ
Converts
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 more