pub struct SchemaPackage<S: Schema> { /* private fields */ }Expand description
A generated schema package marker carrying fingerprint evidence branded by S: Schema.
Implementations§
Source§impl<S: Schema> SchemaPackage<S>
impl<S: Schema> SchemaPackage<S>
Sourcepub fn open_migration_catalog(
&self,
bytes: &[u8],
) -> Result<MigrationCatalog<S>>
pub fn open_migration_catalog( &self, bytes: &[u8], ) -> Result<MigrationCatalog<S>>
Open the generated package’s canonical migration-history resource.
Package authority and every bundled schema/manifest are verified offline before the catalog is returned. This operation performs no connection, database, transaction, journal, or provider I/O.
Source§impl<S: Schema> SchemaPackage<S>
impl<S: Schema> SchemaPackage<S>
Sourcepub fn encode_attribute<T>(&self, value: T) -> Result<Vec<u8>>where
T: Model<Schema = S> + IntoEncodedScalar,
pub fn encode_attribute<T>(&self, value: T) -> Result<Vec<u8>>where
T: Model<Schema = S> + IntoEncodedScalar,
Encode one exact generated attribute value as canonical projected-record bytes.
Sourcepub fn encode_attribute_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: Model<Schema = S> + IntoEncodedScalar,
pub fn encode_attribute_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: Model<Schema = S> + IntoEncodedScalar,
Encode one generated attribute under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_attribute<T>(&self, bytes: &[u8]) -> Result<T>where
T: Model<Schema = S> + GroupedQueryValue,
pub fn decode_attribute<T>(&self, bytes: &[u8]) -> Result<T>where
T: Model<Schema = S> + GroupedQueryValue,
Decode canonical projected-record bytes as one exact generated attribute value.
Sourcepub fn decode_attribute_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: Model<Schema = S> + GroupedQueryValue,
pub fn decode_attribute_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: Model<Schema = S> + GroupedQueryValue,
Decode one exact generated attribute under cancellation, deadline, and limits.
Sourcepub fn encode_create<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedCreate,
pub fn encode_create<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedCreate,
Encode one exact generated create payload as canonical projected-record bytes.
Sourcepub fn encode_create_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedCreate,
pub fn encode_create_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedCreate,
Encode one generated create under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_create<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeCreate<Schema = S>,
pub fn decode_create<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeCreate<Schema = S>,
Decode canonical projected-record bytes as one exact generated create type.
Sourcepub fn decode_create_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeCreate<Schema = S>,
pub fn decode_create_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeCreate<Schema = S>,
Decode one exact generated create under cancellation, deadline, and limits.
Sourcepub fn encode_reference<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedReference,
pub fn encode_reference<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedReference,
Encode one exact generated detached reference as canonical projected-record bytes.
Sourcepub fn encode_reference_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedReference,
pub fn encode_reference_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedReference,
Encode one generated reference under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_reference<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeReference<Schema = S>,
pub fn decode_reference<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeReference<Schema = S>,
Decode canonical projected-record bytes as one exact generated detached reference.
Sourcepub fn decode_reference_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeReference<Schema = S>,
pub fn decode_reference_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeReference<Schema = S>,
Decode one exact generated reference under cancellation, deadline, and limits.
Sourcepub fn encode_snapshot<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoHydratedSnapshot + Model<Schema = S>,
pub fn encode_snapshot<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoHydratedSnapshot + Model<Schema = S>,
Encode one exact generated hydrated model as a provider-free canonical snapshot.
Sourcepub fn encode_snapshot_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoHydratedSnapshot + Model<Schema = S>,
pub fn encode_snapshot_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoHydratedSnapshot + Model<Schema = S>,
Encode one generated snapshot under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_snapshot<T>(&self, bytes: &[u8]) -> Result<T>where
T: CompleteModel<Schema = S> + MaterializeModel,
pub fn decode_snapshot<T>(&self, bytes: &[u8]) -> Result<T>where
T: CompleteModel<Schema = S> + MaterializeModel,
Decode canonical snapshot bytes as one exact detached generated model.
Sourcepub fn decode_snapshot_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: CompleteModel<Schema = S> + MaterializeModel,
pub fn decode_snapshot_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: CompleteModel<Schema = S> + MaterializeModel,
Decode one exact detached snapshot under cancellation, deadline, and limits.
Sourcepub fn verify(&self) -> Result<()>
pub fn verify(&self) -> Result<()>
Perform offline fingerprint, authority, and exact emitter-evidence verification without connecting to a live server.
Sourcepub async fn connect(
self,
policy: DirectConnectionPolicy,
) -> Result<Database<S>>
pub async fn connect( self, policy: DirectConnectionPolicy, ) -> Result<Database<S>>
Verify this generated package and open an already schema-bound direct database through the canonical connection policy.
Server compatibility is discovered authoritatively; callers cannot supply or override the server version used for admission.
Sourcepub async fn connect_with_cancellation(
self,
policy: DirectConnectionPolicy,
cancellation: AnswerCancellation,
) -> Result<Database<S>>
pub async fn connect_with_cancellation( self, policy: DirectConnectionPolicy, cancellation: AnswerCancellation, ) -> Result<Database<S>>
Verify this generated package and open an already schema-bound direct database with one wakeable connection-cancellation owner.
Sourcepub fn encode_struct<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedStruct + StructValue<Schema = S>,
pub fn encode_struct<T>(&self, value: T) -> Result<Vec<u8>>where
T: IntoEncodedStruct + StructValue<Schema = S>,
Encode one exact generated struct as canonical projected-record bytes.
Sourcepub fn encode_struct_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedStruct + StructValue<Schema = S>,
pub fn encode_struct_controlled<T>(
&self,
value: T,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>where
T: IntoEncodedStruct + StructValue<Schema = S>,
Encode one generated struct under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_struct<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeStruct + StructValue<Schema = S>,
pub fn decode_struct<T>(&self, bytes: &[u8]) -> Result<T>where
T: MaterializeStruct + StructValue<Schema = S>,
Decode canonical projected-record bytes as one exact generated struct.
Sourcepub fn decode_struct_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeStruct + StructValue<Schema = S>,
pub fn decode_struct_controlled<T>(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<T>where
T: MaterializeStruct + StructValue<Schema = S>,
Decode one exact generated struct under cancellation, deadline, and limits.
Sourcepub fn encode_archive<I, B>(&self, records: I) -> Result<Vec<u8>>
pub fn encode_archive<I, B>(&self, records: I) -> Result<Vec<u8>>
Compose already canonical package records into one deterministic ordered archive.
Sourcepub fn encode_archive_controlled<I, B>(
&self,
records: I,
options: &CanonicalCodecOptions,
) -> Result<Vec<u8>>
pub fn encode_archive_controlled<I, B>( &self, records: I, options: &CanonicalCodecOptions, ) -> Result<Vec<u8>>
Compose canonical records under cancellation, deadline, and tighten-only limits.
Sourcepub fn decode_archive(&self, bytes: &[u8]) -> Result<Vec<Vec<u8>>>
pub fn decode_archive(&self, bytes: &[u8]) -> Result<Vec<Vec<u8>>>
Strictly decode one complete package archive into canonical individual records.
Sourcepub fn decode_archive_controlled(
&self,
bytes: &[u8],
options: &CanonicalCodecOptions,
) -> Result<Vec<Vec<u8>>>
pub fn decode_archive_controlled( &self, bytes: &[u8], options: &CanonicalCodecOptions, ) -> Result<Vec<Vec<u8>>>
Decode one complete archive under cancellation, deadline, and tighten-only limits.
Trait Implementations§
Source§impl<S: Clone + Schema> Clone for SchemaPackage<S>
impl<S: Clone + Schema> Clone for SchemaPackage<S>
Source§fn clone(&self) -> SchemaPackage<S>
fn clone(&self) -> SchemaPackage<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<S: Copy + Schema> Copy for SchemaPackage<S>
impl<S: Eq + Schema> Eq for SchemaPackage<S>
impl<S: PartialEq + Schema> StructuralPartialEq for SchemaPackage<S>
Auto Trait Implementations§
impl<S> Freeze for SchemaPackage<S>
impl<S> RefUnwindSafe for SchemaPackage<S>
impl<S> Send for SchemaPackage<S>
impl<S> Sync for SchemaPackage<S>
impl<S> Unpin for SchemaPackage<S>
impl<S> UnsafeUnpin for SchemaPackage<S>
impl<S> UnwindSafe for SchemaPackage<S>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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