pub struct DocInfo {
pub name: Text,
pub type_name: DocumentType,
pub theory: Option<String>,
pub permissions: Vec<PermissionInfo>,
pub created_at: DateTime<Utc>,
pub deleted_at: Option<DateTime<Utc>>,
pub current_snapshot_updated_at: DateTime<Utc>,
pub current_snapshot: i32,
pub snapshots: HashMap<String, SnapshotInfo>,
pub depends_on: Vec<RelationInfo>,
pub used_by: Vec<RelationInfo>,
}Expand description
Document reference information for user state synchronization.
Contains lightweight metadata about a document that the user has access to.
Fields§
§name: TextThe name of the document.
type_name: DocumentTypeThe type of the document.
theory: Option<String>The theory of the document, if it is a model.
permissions: Vec<PermissionInfo>All permissions on this document (users and public).
created_at: DateTime<Utc>When this document was created.
deleted_at: Option<DateTime<Utc>>When this document was deleted, if applicable.
current_snapshot_updated_at: DateTime<Utc>When the current snapshot pointer was last changed (snapshot created or undo/redo).
current_snapshot: i32The database ID of the current (active) snapshot.
snapshots: HashMap<String, SnapshotInfo>All snapshots for this document, keyed by stringified snapshot ID.
depends_on: Vec<RelationInfo>Outgoing relations from this document to other documents.
used_by: Vec<RelationInfo>Reverse relations: other documents that depend on this one.
Computed from depends_on across all documents. Each entry identifies
the dependent document and the relation type.
Trait Implementations§
Source§impl Arbitrary for DocInfo
impl Arbitrary for DocInfo
Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<DocInfo>
type Strategy = BoxedStrategy<DocInfo>
Strategy used to generate values of type Self.Source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
Source§impl Hydrate for DocInfo
impl Hydrate for DocInfo
fn hydrate_map<D: ReadDoc>(doc: &D, obj: &ObjId) -> Result<Self, HydrateError>
fn hydrate<D>(doc: &D, obj: &ExId, prop: Prop<'_>) -> Result<Self, HydrateError>where
D: ReadDoc,
fn hydrate_scalar(s: Cow<'_, ScalarValue>) -> Result<Self, HydrateError>
fn hydrate_bool(_b: bool) -> Result<Self, HydrateError>
fn hydrate_bytes(_bytes: &[u8]) -> Result<Self, HydrateError>
fn hydrate_f64(_f: f64) -> Result<Self, HydrateError>
fn hydrate_counter(_c: i64) -> Result<Self, HydrateError>
fn hydrate_int(_i: i64) -> Result<Self, HydrateError>
fn hydrate_uint(_u: u64) -> Result<Self, HydrateError>
fn hydrate_string(_string: &str) -> Result<Self, HydrateError>
fn hydrate_timestamp(_t: i64) -> Result<Self, HydrateError>
fn hydrate_unknown(_type_code: u8, _bytes: &[u8]) -> Result<Self, HydrateError>
fn hydrate_seq<D>(_doc: &D, _obj: &ExId) -> Result<Self, HydrateError>where
D: ReadDoc,
fn hydrate_text<D>(_doc: &D, _obj: &ExId) -> Result<Self, HydrateError>where
D: ReadDoc,
fn hydrate_none() -> Result<Self, HydrateError>
Source§impl Reconcile for DocInfo
impl Reconcile for DocInfo
Source§fn reconcile<__R123: Reconciler>(
&self,
reconciler: __R123,
) -> Result<(), __R123::Error>
fn reconcile<__R123: Reconciler>( &self, reconciler: __R123, ) -> Result<(), __R123::Error>
§fn hydrate_key<'a, D>(
doc: &D,
obj: &ExId,
prop: Prop<'_>,
) -> Result<LoadKey<Self::Key<'a>>, ReconcileError>where
D: ReadDoc,
fn hydrate_key<'a, D>(
doc: &D,
obj: &ExId,
prop: Prop<'_>,
) -> Result<LoadKey<Self::Key<'a>>, ReconcileError>where
D: ReadDoc,
Source§impl TS for DocInfo
impl TS for DocInfo
Source§type WithoutGenerics = DocInfo
type WithoutGenerics = DocInfo
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = DocInfo
type OptionInnerType = DocInfo
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use [
TS::export]. Read more§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use [
TS::export]. Read more§fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
§fn default_output_path() -> Option<PathBuf>
fn default_output_path() -> Option<PathBuf>
T should be exported. Read moreimpl Eq for DocInfo
impl StructuralPartialEq for DocInfo
Auto Trait Implementations§
impl Freeze for DocInfo
impl RefUnwindSafe for DocInfo
impl Send for DocInfo
impl Sync for DocInfo
impl Unpin for DocInfo
impl UnwindSafe for DocInfo
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Ctx> FromRequestExtensions<Ctx> for Ctxwhere
Ctx: Send,
impl<Ctx> FromRequestExtensions<Ctx> for Ctxwhere
Ctx: Send,
§async fn from_request_extensions(
ctx: Ctx,
_extensions: Extensions,
) -> Result<Ctx, RpcError>
async fn from_request_extensions( ctx: Ctx, _extensions: Extensions, ) -> Result<Ctx, RpcError>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more