pub struct ResponseSlot(pub Mutex<RefCell<Response>>, pub Notify);Expand description
The response slot for each UDS request
Tuple Fields§
§0: Mutex<RefCell<Response>>§1: NotifyImplementations§
Source§impl ResponseSlot
impl ResponseSlot
Sourcepub async fn get(&self) -> Result<Response, DiagError>
pub async fn get(&self) -> Result<Response, DiagError>
Get a response with blocking forever method.
Sourcepub async fn wait_for_response(&self) -> Response
pub async fn wait_for_response(&self) -> Response
Get a response with a
Sourcepub async fn update_response(&self, new_data: Vec<u8>) -> Result<(), FrameError>
pub async fn update_response(&self, new_data: Vec<u8>) -> Result<(), FrameError>
Update the response data into response slot and raise a notification.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ResponseSlot
impl !RefUnwindSafe for ResponseSlot
impl Send for ResponseSlot
impl Sync for ResponseSlot
impl Unpin for ResponseSlot
impl !UnwindSafe for ResponseSlot
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more