Struct RecordCheckout
pub struct RecordCheckout {
pub id: RecordId,
pub kind: RecordKind,
pub references: Vec<(RecordCheckout, String)>,
pub formerly: Vec<RecordId>,
}Expand description
A record named together with its type — what a widget declares it is working on, and what a room index holds.
Fields§
§id: RecordId§kind: RecordKind§references: Vec<(RecordCheckout, String)>Records this one references, and what each means. Declared here (not written by the app) because a reference has two halves only the host can write: it goes into this record’s document, and the target is brought into the room index so it doesn’t dangle. One level deep.
formerly: Vec<RecordId>Identities this record was known by before — a file record that used
to be named by its path. When nothing is stored under Self::id,
the host adopts the stored document of the first former identity that
no other successor has claimed (see RecordCheckout::formerly).
Implementations§
§impl RecordCheckout
impl RecordCheckout
pub fn for_component_tab(
app_id: &str,
tab: u64,
kind: RecordKind,
) -> RecordCheckout
pub fn for_component_tab( app_id: &str, tab: u64, kind: RecordKind, ) -> RecordCheckout
The record a desktop tab of app_id shows: the room’s package-primary
record for Chat, the tab’s own record for every other app. Keeps the
tab identity, so a tab dragged elsewhere keeps its document.
pub fn package_primary(kind: RecordKind) -> RecordCheckout
pub fn new(id: RecordId, kind: RecordKind) -> RecordCheckout
pub fn formerly(self, former: RecordId) -> RecordCheckout
pub fn formerly(self, former: RecordId) -> RecordCheckout
Declare that this record used to be former. Opening it where
nothing is stored under the new id adopts the former record’s
document — its content, history and actors — restamped with the new
identity. Custody of the former document is claimed durably by the
first successor, so a different record naming the same former id
(another file that later sits at the same path) never adopts it too.
The former document itself stays on disk untouched.
pub fn referencing( self, target: RecordCheckout, relation: impl Into<String>, ) -> RecordCheckout
Trait Implementations§
§impl Clone for RecordCheckout
impl Clone for RecordCheckout
§fn clone(&self) -> RecordCheckout
fn clone(&self) -> RecordCheckout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for RecordCheckout
impl Debug for RecordCheckout
§impl Ord for RecordCheckout
impl Ord for RecordCheckout
§fn cmp(&self, other: &RecordCheckout) -> Ordering
fn cmp(&self, other: &RecordCheckout) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for RecordCheckout
impl PartialEq for RecordCheckout
§impl PartialOrd for RecordCheckout
impl PartialOrd for RecordCheckout
impl Eq for RecordCheckout
impl StructuralPartialEq for RecordCheckout
Auto Trait Implementations§
impl Freeze for RecordCheckout
impl RefUnwindSafe for RecordCheckout
impl Send for RecordCheckout
impl Sync for RecordCheckout
impl Unpin for RecordCheckout
impl UnsafeUnpin for RecordCheckout
impl UnwindSafe for RecordCheckout
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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<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
§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