pub struct StatePropertyWriter<'a> { /* private fields */ }Expand description
Writing handle for properties.
Implementations§
Source§impl<'a> StatePropertyWriter<'a>
impl<'a> StatePropertyWriter<'a>
Sourcepub fn new(head: SpaceHead<'a>) -> Self
pub fn new(head: SpaceHead<'a>) -> Self
Create a new property writer that uses the given space head.
Sourcepub fn init<'b, A: Atom<'a, 'b>>(
&'b mut self,
urid: URID<A>,
parameter: A::WriteParameter,
) -> Result<A::WriteHandle, StateErr>
pub fn init<'b, A: Atom<'a, 'b>>( &'b mut self, urid: URID<A>, parameter: A::WriteParameter, ) -> Result<A::WriteHandle, StateErr>
Initialize the property.
This works like any other atom writer: You have to provide the URID of the atom type you want to write, as well as the type-specific parameter. If the property hasn’t been initialized before, it will be initialized and the writing handle is returned. Otherwise, Err(StateErr::Unknown) is returned.
Auto Trait Implementations§
impl<'a> Freeze for StatePropertyWriter<'a>
impl<'a> RefUnwindSafe for StatePropertyWriter<'a>
impl<'a> Send for StatePropertyWriter<'a>
impl<'a> Sync for StatePropertyWriter<'a>
impl<'a> Unpin for StatePropertyWriter<'a>
impl<'a> UnsafeUnpin for StatePropertyWriter<'a>
impl<'a> !UnwindSafe for StatePropertyWriter<'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