Skip to main content

SyncbackSnapshot

Struct SyncbackSnapshot 

Source
pub struct SyncbackSnapshot<'sync> {
    pub data: SyncbackData<'sync>,
    pub old: Option<Ref>,
    pub new: Ref,
    pub path: PathBuf,
    pub middleware: Option<Middleware>,
}

Fields§

§data: SyncbackData<'sync>§old: Option<Ref>§new: Ref§path: PathBuf§middleware: Option<Middleware>

Implementations§

Source§

impl<'sync> SyncbackSnapshot<'sync>

Source

pub fn with_joined_path( &self, new_ref: Ref, old_ref: Option<Ref>, ) -> Result<Self>

Constructs a SyncbackSnapshot from the provided refs while inheriting this snapshot’s path and data. This should be used for directories.

Source

pub fn with_base_path( &self, base_path: &Path, new_ref: Ref, old_ref: Option<Ref>, ) -> Result<Self>

Constructs a SyncbackSnapshot from the provided refs and a base path, while inheriting this snapshot’s data.

The actual path of the snapshot is made by getting a file name for the snapshot and then appending it to the provided base path.

Source

pub fn with_new_path( &self, path: PathBuf, new_ref: Ref, old_ref: Option<Ref>, ) -> Self

Constructs a SyncbackSnapshot with the provided path and refs while inheriting the data of the this snapshot.

Source

pub fn middleware(self, middleware: Middleware) -> Self

Allows a middleware to be ‘forced’ onto a SyncbackSnapshot to override the attempts to derive it.

Source

pub fn get_path_filtered_properties( &self, new_ref: Ref, ) -> Option<UstrMap<&'sync Variant>>

Returns a map of properties for an Instance from the ‘new’ tree with filtering done to avoid noise. This method filters out properties that are not meant to be present in Instances that are represented specially by a path, like LocalScript.Source and StringValue.Value.

This method is not necessary or desired for blobs like Rbxm or non-path middlewares like JsonModel.

Source

pub fn get_new_inst_path(&self, referent: Ref) -> String

Returns a path to the provided Instance in the new DOM. This path is where you would look for the object in Roblox Studio.

Source

pub fn get_old_inst_path(&self, referent: Ref) -> String

Returns a path to the provided Instance in the old DOM. This path is where you would look for the object in Roblox Studio.

Source

pub fn get_old_instance(&self, referent: Ref) -> Option<InstanceWithMeta<'sync>>

Returns an Instance from the old tree with the provided referent, if it exists.

Source

pub fn get_new_instance(&self, referent: Ref) -> Option<&'sync Instance>

Returns an Instance from the new tree with the provided referent, if it exists.

Source

pub fn old_inst(&self) -> Option<InstanceWithMeta<'sync>>

The ‘old’ Instance this snapshot is for, if it exists.

Source

pub fn new_inst(&self) -> &'sync Instance

The ‘new’ Instance this snapshot is for.

Source

pub fn project(&self) -> &'sync Project

Returns the root Project that was used to make this snapshot.

Source

pub fn vfs(&self) -> &'sync Vfs

Returns the underlying VFS being used for syncback.

Source

pub fn new_tree(&self) -> &'sync WeakDom

Returns the WeakDom used for the ‘new’ tree.

Source

pub fn old_tree(&self) -> &'sync WeakDom

Returns the WeakDom used for the ‘old’ tree.

Source

pub fn ignore_props(&self) -> Option<&IndexMap<Ustr, Vec<Ustr>>>

Returns user-specified property ignore rules.

Source

pub fn ignore_tree(&self) -> Option<&[String]>

Returns user-specified ignore tree.

Auto Trait Implementations§

§

impl<'sync> Freeze for SyncbackSnapshot<'sync>

§

impl<'sync> RefUnwindSafe for SyncbackSnapshot<'sync>

§

impl<'sync> Send for SyncbackSnapshot<'sync>

§

impl<'sync> Sync for SyncbackSnapshot<'sync>

§

impl<'sync> Unpin for SyncbackSnapshot<'sync>

§

impl<'sync> UnsafeUnpin for SyncbackSnapshot<'sync>

§

impl<'sync> UnwindSafe for SyncbackSnapshot<'sync>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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