pub trait InvariantReadContextExt: BizInvariantReadContext {
// Provided methods
fn with_read_typed<R, T, F>(
&self,
sys_id: SysId,
f: F,
) -> Result<Option<T>, RuntimeHostError>
where R: GeneratedRecordAccess,
F: FnOnce(R::Access<'_>) -> T { ... }
fn with_read_typed_by_pk<R, P, T, F>(
&self,
pk: P,
f: F,
) -> Result<Option<T>, RuntimeHostError>
where R: GeneratedRecordAccess,
P: AsRef<[u8]>,
F: FnOnce(R::Access<'_>) -> T { ... }
}Expand description
Typed convenience methods for BizInvariantReadContext.
Provided Methods§
Sourcefn with_read_typed<R, T, F>(
&self,
sys_id: SysId,
f: F,
) -> Result<Option<T>, RuntimeHostError>
fn with_read_typed<R, T, F>( &self, sys_id: SysId, f: F, ) -> Result<Option<T>, RuntimeHostError>
Reads a generated record by system id.
Sourcefn with_read_typed_by_pk<R, P, T, F>(
&self,
pk: P,
f: F,
) -> Result<Option<T>, RuntimeHostError>
fn with_read_typed_by_pk<R, P, T, F>( &self, pk: P, f: F, ) -> Result<Option<T>, RuntimeHostError>
Reads a generated record by primary key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.