pub struct DevEvent { /* private fields */ }Expand description
One development event before it is wrapped in a StreamEnvelope.
Implementations§
Source§impl DevEvent
impl DevEvent
Sourcepub fn new(
kind: impl Into<String>,
atelier_node: Symbol,
latency_class: LatencyClass,
payload: Expr,
) -> Result<Self>
pub fn new( kind: impl Into<String>, atelier_node: Symbol, latency_class: LatencyClass, payload: Expr, ) -> Result<Self>
Builds a development event with an explicit latency class.
Sourcepub fn edit(atelier_node: Symbol, payload: Expr) -> Result<Self>
pub fn edit(atelier_node: Symbol, payload: Expr) -> Result<Self>
Builds an interactive edit event.
Sourcepub fn validate(atelier_node: Symbol, payload: Expr) -> Result<Self>
pub fn validate(atelier_node: Symbol, payload: Expr) -> Result<Self>
Builds an offline validation event.
Sourcepub fn refusal(atelier_node: Symbol, payload: Expr) -> Result<Self>
pub fn refusal(atelier_node: Symbol, payload: Expr) -> Result<Self>
Builds a refusal event for a denied development action.
Sourcepub fn with_ticks(self, ticks: Vec<Tick>) -> Result<Self>
pub fn with_ticks(self, ticks: Vec<Tick>) -> Result<Self>
Attaches ticks to this event.
Sourcepub fn atelier_node(&self) -> &Symbol
pub fn atelier_node(&self) -> &Symbol
Returns the originating Atelier node id.
Sourcepub fn latency_class(&self) -> LatencyClass
pub fn latency_class(&self) -> LatencyClass
Returns the event latency class.
Sourcepub fn stream_item(&self) -> Result<StreamItem>
pub fn stream_item(&self) -> Result<StreamItem>
Converts this event to a stream item using ide/event/<kind> data.
Trait Implementations§
impl Eq for DevEvent
impl StructuralPartialEq for DevEvent
Auto Trait Implementations§
impl Freeze for DevEvent
impl RefUnwindSafe for DevEvent
impl Send for DevEvent
impl Sync for DevEvent
impl Unpin for DevEvent
impl UnsafeUnpin for DevEvent
impl UnwindSafe for DevEvent
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