feat: add method take for BrowserFormData (#4102)

This commit is contained in:
Gabriel Lopes Veiga
2025-06-22 14:55:48 -03:00
committed by GitHub
parent cf0aa0e4d7
commit f51c676e0d

View File

@@ -75,6 +75,13 @@ impl DerefMut for BrowserRequest {
#[derive(Debug)]
pub struct BrowserFormData(pub(crate) SendWrapper<FormData>);
impl BrowserFormData {
/// Returns the raw `web_sys::FormData` struct.
pub fn take(self) -> FormData {
self.0.take()
}
}
impl From<FormData> for BrowserFormData {
fn from(value: FormData) -> Self {
Self(SendWrapper::new(value))