-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2219 from hannobraun/derive
Add `DeriveFrom`
- Loading branch information
Showing
21 changed files
with
303 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//! Mark a stored object as derived from another | ||
//! | ||
//! See [`DeriveFrom`]. | ||
use crate::{storage::Handle, Core}; | ||
|
||
/// Mark a store object as derived from another | ||
pub trait DeriveFrom { | ||
/// Mark this object as derived from the other object provided | ||
fn derive_from(self, other: &Self, core: &mut Core) -> Self; | ||
} | ||
|
||
impl<T> DeriveFrom for Handle<T> { | ||
fn derive_from(self, _other: &Self, _core: &mut Core) -> Self { | ||
// This is currently a no-op. Eventually, it will trigger a command to | ||
// the layers that this information is relevant for. | ||
self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.