Skip to main content

SchemaPackage

Struct SchemaPackage 

Source
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>

Source

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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn verify(&self) -> Result<()>

Perform offline fingerprint, authority, and exact emitter-evidence verification without connecting to a live server.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn encode_archive<I, B>(&self, records: I) -> Result<Vec<u8>>
where I: IntoIterator<Item = B>, B: AsRef<[u8]>,

Compose already canonical package records into one deterministic ordered archive.

Source

pub fn encode_archive_controlled<I, B>( &self, records: I, options: &CanonicalCodecOptions, ) -> Result<Vec<u8>>
where I: IntoIterator<Item = B>, B: AsRef<[u8]>,

Compose canonical records under cancellation, deadline, and tighten-only limits.

Source

pub fn decode_archive(&self, bytes: &[u8]) -> Result<Vec<Vec<u8>>>

Strictly decode one complete package archive into canonical individual records.

Source

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>

Source§

fn clone(&self) -> SchemaPackage<S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Copy + Schema> Copy for SchemaPackage<S>

Source§

impl<S: Debug + Schema> Debug for SchemaPackage<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Eq + Schema> Eq for SchemaPackage<S>

Source§

impl<S: PartialEq + Schema> PartialEq for SchemaPackage<S>

Source§

fn eq(&self, other: &SchemaPackage<S>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<S: PartialEq + Schema> StructuralPartialEq for SchemaPackage<S>

Auto Trait Implementations§

§

impl<S> Freeze for SchemaPackage<S>
where PhantomData<fn() -> S>: Freeze,

§

impl<S> RefUnwindSafe for SchemaPackage<S>
where PhantomData<fn() -> S>: RefUnwindSafe,

§

impl<S> Send for SchemaPackage<S>
where PhantomData<fn() -> S>: Send,

§

impl<S> Sync for SchemaPackage<S>
where PhantomData<fn() -> S>: Sync,

§

impl<S> Unpin for SchemaPackage<S>
where PhantomData<fn() -> S>: Unpin,

§

impl<S> UnsafeUnpin for SchemaPackage<S>
where PhantomData<fn() -> S>: UnsafeUnpin,

§

impl<S> UnwindSafe for SchemaPackage<S>
where PhantomData<fn() -> S>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more