pub struct ResourceEventWriter<'a, 'n: 'a> { /* private fields */ }
Expand description
Writer for an event that occurred to a resource.
Created by VersionWriter::event
and ResourceEventsWriter::add_event
.
Implementations§
source§impl<'a, 'n: 'a> ResourceEventWriter<'a, 'n>
impl<'a, 'n: 'a> ResourceEventWriter<'a, 'n>
sourcepub fn action(&mut self, action: ResourceEventAction<'_>) -> &mut Self
pub fn action(&mut self, action: ResourceEventAction<'_>) -> &mut Self
Write the stEvt:action
property.
The action that occurred to the resource.
sourcepub fn changed(&mut self, parts: &str) -> &mut Self
pub fn changed(&mut self, parts: &str) -> &mut Self
Write the stEvt:changed
property.
Semicolon-separated list of the parts of the resource that changed.
sourcepub fn instance_id(&mut self, id: &str) -> &mut Self
pub fn instance_id(&mut self, id: &str) -> &mut Self
Write the stEvt:instanceID
property.
Value of the XmpWriter::instance_id
property at the time of the action.
sourcepub fn parameters(&mut self, params: &str) -> &mut Self
pub fn parameters(&mut self, params: &str) -> &mut Self
Write the stEvt:changed
property.
Additional parameters for the action.
sourcepub fn software_agent(&mut self, agent: &str) -> &mut Self
pub fn software_agent(&mut self, agent: &str) -> &mut Self
Write the stEvt:softwareAgent
property.
The name of the software agent that performed the action.
Methods from Deref<Target = Struct<'a, 'n>>§
sourcepub fn element(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
) -> Element<'_, 'n>
pub fn element( &mut self, name: &'a str, namespace: Namespace<'n>, ) -> Element<'_, 'n>
Start writing a property in the struct.
sourcepub fn element_with_attrs<'b>(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
attrs: impl IntoIterator<Item = (&'b str, &'b str)>,
) -> Element<'_, 'n>
pub fn element_with_attrs<'b>( &mut self, name: &'a str, namespace: Namespace<'n>, attrs: impl IntoIterator<Item = (&'b str, &'b str)>, ) -> Element<'_, 'n>
Start writing a property with attributes in the struct.
Trait Implementations§
source§impl<'a, 'n> Deref for ResourceEventWriter<'a, 'n>
impl<'a, 'n> Deref for ResourceEventWriter<'a, 'n>
Auto Trait Implementations§
impl<'a, 'n> Freeze for ResourceEventWriter<'a, 'n>
impl<'a, 'n> RefUnwindSafe for ResourceEventWriter<'a, 'n>
impl<'a, 'n> Send for ResourceEventWriter<'a, 'n>
impl<'a, 'n> Sync for ResourceEventWriter<'a, 'n>
impl<'a, 'n> Unpin for ResourceEventWriter<'a, 'n>
impl<'a, 'n> !UnwindSafe for ResourceEventWriter<'a, 'n>
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