pub struct ResponseBuilder<'a> { /* private fields */ }Expand description
Implementations§
source§impl<'a> ResponseBuilder<'a>
impl<'a> ResponseBuilder<'a>
sourcepub fn next_signature(
&mut self,
) -> Option<(&str, &Signature, Option<&mut Unwinder<'a>>)>
pub fn next_signature( &mut self, ) -> Option<(&str, &Signature, Option<&mut Unwinder<'a>>)>
Use this in a while let Some((resource, signature)) = response_builder.next_signature()
loop to add all the returned values to Self::add_diff.
If you don’t have a resource, just don’t call Self::add_diff. Agde will then automatically
send a delete event then.
sourcepub fn unwinder(&mut self) -> Option<&mut Unwinder<'a>>
pub fn unwinder(&mut self) -> Option<&mut Unwinder<'a>>
Returns the unwinder (if any) to use for the resource before adding it.
sourcepub fn add_diff(&mut self, resource: String, diff: Difference) -> &mut Self
pub fn add_diff(&mut self, resource: String, diff: Difference) -> &mut Self
Tell the requester their resource needs to apply diff to get our data.
You have to unwind resource before getting the diff if Self::unwinder returns
Some.
§Panics
Panics if you’ve called this with the same resource before.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ResponseBuilder<'a>
impl<'a> RefUnwindSafe for ResponseBuilder<'a>
impl<'a> Send for ResponseBuilder<'a>
impl<'a> Sync for ResponseBuilder<'a>
impl<'a> Unpin for ResponseBuilder<'a>
impl<'a> UnwindSafe for ResponseBuilder<'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