pub struct FileRoot(/* private fields */);Expand description
A root path for files tracked by the database.
We currently create roots for:
- static module resolution paths
- the project root
File roots determine the durability of files and directories.
Implementations§
Source§impl FileRoot
impl FileRoot
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<Self>
pub fn ingredient_mut( zalsa_mut: &mut Zalsa, ) -> (&mut IngredientImpl<Self>, &mut Runtime)
Source§impl FileRoot
impl FileRoot
pub fn new<Db_>( db: &Db_, path: Box<SystemPath>, kind_at_time_of_creation: FileRootKind, ) -> Self
pub fn builder( path: Box<SystemPath>, kind_at_time_of_creation: FileRootKind, ) -> <Self as HasBuilder>::Builder
Sourcepub fn path<'db, Db_>(
self,
db: &'db Db_,
) -> &'db <Box<SystemPath> as Deref>::Target
pub fn path<'db, Db_>( self, db: &'db Db_, ) -> &'db <Box<SystemPath> as Deref>::Target
The path of a root is guaranteed to never change.
Sourcepub fn kind_at_time_of_creation<'db, Db_>(self, db: &'db Db_) -> FileRootKind
pub fn kind_at_time_of_creation<'db, Db_>(self, db: &'db Db_) -> FileRootKind
The kind of the root at the time of its creation.
pub fn set_path<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Box<SystemPath>>
pub fn set_kind_at_time_of_creation<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = FileRootKind>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Trait Implementations§
Source§impl Configuration for FileRoot
impl Configuration for FileRoot
const LOCATION: Location
const DEBUG_NAME: &'static str = "FileRoot"
const FIELD_DEBUG_NAMES: &'static [&'static str]
Source§type Fields = (Box<SystemPath>, FileRootKind)
type Fields = (Box<SystemPath>, FileRootKind)
A (possibly empty) tuple of the fields for this struct.
type Revisions = [Revision; 2]
type Durabilities = [Durability; 2]
Source§fn heap_size(value: &Self::Fields) -> Option<usize>
fn heap_size(value: &Self::Fields) -> Option<usize>
Returns the size of any heap allocations in the output value, in bytes.
Source§fn serialize<S: Serializer>(
fields: &Self::Fields,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields, serializer: S, ) -> Result<S::Ok, S::Error>
Serialize the fields using
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields, D::Error>
Deserialize the fields using
serde. Read moreimpl Copy for FileRoot
impl Eq for FileRoot
Source§impl SalsaStructInDb for FileRoot
impl SalsaStructInDb for FileRoot
Source§const LEAF_TYPE_IDS: &'static [ConstTypeId]
const LEAF_TYPE_IDS: &'static [ConstTypeId]
The type IDs of all concrete (leaf) salsa struct types that this type can contain. Read more
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Lookup or create ingredient indices. Read more
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Returns the IDs of any instances of this struct in the database.
impl SalsaValue for FileRoot
impl StructuralPartialEq for FileRoot
Auto Trait Implementations§
impl Freeze for FileRoot
impl RefUnwindSafe for FileRoot
impl Send for FileRoot
impl Sync for FileRoot
impl Unpin for FileRoot
impl UnsafeUnpin for FileRoot
impl UnwindSafe for FileRoot
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
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
impl<Q, K> Equivalent<K> for Q
Source§impl<T> HashEqLike<&T> for T
impl<T> HashEqLike<&T> for T
Source§impl<T> HashEqLike<Cow<'_, T>> for T
impl<T> HashEqLike<Cow<'_, T>> for T
Source§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
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> ⓘ
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 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> ⓘ
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