pub struct ViewModel {
pub properties: ViewModelProperties,
/* private fields */
}
Fields§
§properties: ViewModelProperties
Implementations§
source§impl ViewModel
impl ViewModel
pub fn new<T: 'static>(object: T, properties: ViewModelProperties) -> Self
pub fn new_object<T: 'static>(object: T) -> Self
pub fn produce<T: 'static>( producer: impl FnOnce(&mut ViewModelProperties) -> T, ) -> Self
pub fn borrow<T: 'static>(&self) -> Option<ManagedRef<T>>
pub fn borrow_mut<T: 'static>(&mut self) -> Option<ManagedRefMut<T>>
pub fn lazy<T: 'static>(&self) -> Option<ManagedLazy<T>>
pub fn read<T: 'static>(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write<T: 'static>(&mut self) -> Option<ValueWriteAccess<'_, T>>
pub fn write_notified<T: 'static>(&mut self) -> Option<ViewModelObject<'_, T>>
Auto Trait Implementations§
impl Freeze for ViewModel
impl RefUnwindSafe for ViewModel
impl Send for ViewModel
impl Sync for ViewModel
impl Unpin for ViewModel
impl UnwindSafe for ViewModel
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