pub struct AppDataDictionaryUpdater<'a> { /* private fields */ }Available on (32-bit or 64-bit) and crate feature
extensions-draft-08 only.Expand description
Keeps the old dictionary as well as the values that are being overwritten
Implementations§
Source§impl<'a> AppDataDictionaryUpdater<'a>
impl<'a> AppDataDictionaryUpdater<'a>
Sourcepub fn new(old_dict: Option<&'a AppDataDictionary>) -> Self
pub fn new(old_dict: Option<&'a AppDataDictionary>) -> Self
Creates a new AppDataDictionaryUpdater.
Sourcepub fn old_value(&self, component_id: ComponentId) -> Option<&[u8]>
pub fn old_value(&self, component_id: ComponentId) -> Option<&[u8]>
Looks up the old value for a component.
Sourcepub fn set(&mut self, component_data: ComponentData)
pub fn set(&mut self, component_data: ComponentData)
Sets a value in the new_entries. if we already have data for that component id, overwrite it. Else add it in the right position.
Sourcepub fn remove(&mut self, id: &ComponentId)
pub fn remove(&mut self, id: &ComponentId)
Flags an entry in the dictionary for removal
Sourcepub fn changes(self) -> Option<AppDataUpdates>
pub fn changes(self) -> Option<AppDataUpdates>
Consumes the updater and returns just the changes, so we can pass them into process_unverified_message. Only returns Some if we actually called set.
Auto Trait Implementations§
impl<'a> Freeze for AppDataDictionaryUpdater<'a>
impl<'a> RefUnwindSafe for AppDataDictionaryUpdater<'a>
impl<'a> Send for AppDataDictionaryUpdater<'a>
impl<'a> Sync for AppDataDictionaryUpdater<'a>
impl<'a> Unpin for AppDataDictionaryUpdater<'a>
impl<'a> UnwindSafe for AppDataDictionaryUpdater<'a>
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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