pub struct Replaced {
pub dropped: Vec<String>,
pub kept: Vec<String>,
pub added: Vec<String>,
}Expand description
What Htl::replace_bundle did, so a host can say it rather than guess.
Three lists because three things happen to a name, and a host that logs “reloaded” for all of them is hiding the two that matter: a module that went away for good, and one whose live value was deliberately spared.
A module both bundles carry appears in dropped and in added — which is what
happened to it: the old one was taken out of package.loaded, and the new one is what
the next require will evaluate. Nothing is in both dropped and kept.
Fields§
§dropped: Vec<String>Names the old bundle had installed that are now out of package.preload and
package.loaded: the next require of one evaluates whatever answers it now, and
for a name the new bundle does not carry there may be nothing left to answer.
kept: Vec<String>Names from keep that the old bundle had actually installed, and whose evaluated
value is still in package.loaded. Shorter than the keep that was asked for when
a name in it was never this bundle’s — the host’s own module, or a typo — which is
the only report of that.
added: Vec<String>Names the new bundle wrote into package.preload. Not what it carries: a name the
host had registered first is still the host’s and is not here.
Trait Implementations§
impl Eq for Replaced
impl StructuralPartialEq for Replaced
Auto Trait Implementations§
impl Freeze for Replaced
impl RefUnwindSafe for Replaced
impl Send for Replaced
impl Sync for Replaced
impl Unpin for Replaced
impl UnsafeUnpin for Replaced
impl UnwindSafe for Replaced
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.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