use crate::mysql::protocol::new_writer::NewWriter;
use crate::shared::Data;
#[derive(Default)]
pub struct AuthSwitchResponse {
pub auth_response: Data, }
impl AuthSwitchResponse {
pub fn write_internal<C: super::new_writer::WriterContext>(
&self,
writer: NewWriter<C>,
) -> Result<(), bun_core::Error> {
writer.write(self.auth_response.slice())?;
Ok(())
}
pub fn write<C: super::new_writer::WriterContext>(
&self,
context: C,
) -> Result<(), bun_core::Error> {
self.write_internal(NewWriter { wrapped: context })
}
}