pub struct rustfmtSender { /* private fields */ }Expand description
Main client for sending rustfmt-schema data to a backend
Implementations§
Source§impl rustfmtSender
impl rustfmtSender
Sourcepub fn new(config: BackendConfig) -> Result<Self>
pub fn new(config: BackendConfig) -> Result<Self>
Create a new rustfmtSender instance with the given configuration
Sourcepub fn new_default() -> Result<Self>
pub fn new_default() -> Result<Self>
Create a new rustfmtSender instance with default configuration
Sourcepub fn read_rustfmt_file<P: AsRef<Path>>(&self, path: P) -> Result<rustfmtData>
pub fn read_rustfmt_file<P: AsRef<Path>>(&self, path: P) -> Result<rustfmtData>
Read rustfmt-schema variables from a .rustfmt file
Sourcepub async fn send_rustfmt_data(&self, rustfmt_data: &rustfmtData) -> Result<()>
pub async fn send_rustfmt_data(&self, rustfmt_data: &rustfmtData) -> Result<()>
Send rustfmt-schema data to the backend server
Sourcepub async fn read_and_send<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub async fn read_and_send<P: AsRef<Path>>(&self, path: P) -> Result<()>
Convenience method to read and send rustfmt-schema data in one call
Sourcepub async fn read_and_send_multiple<P: AsRef<Path>>(
&self,
paths: &[P],
) -> Result<()>
pub async fn read_and_send_multiple<P: AsRef<Path>>( &self, paths: &[P], ) -> Result<()>
Read rustfmt-schema data from multiple files and send them
Sourcepub fn read_rustfmt_schema_file<P: AsRef<Path>>(
&self,
path: P,
) -> Result<rustfmtData>
pub fn read_rustfmt_schema_file<P: AsRef<Path>>( &self, path: P, ) -> Result<rustfmtData>
Read rustfmt-schema variables from various rustfmt-schema file formats
Sourcepub async fn read_and_send_common_rustfmt(&self) -> Result<()>
pub async fn read_and_send_common_rustfmt(&self) -> Result<()>
Try to read common rustfmt-schema file names
Auto Trait Implementations§
impl Freeze for rustfmtSender
impl !RefUnwindSafe for rustfmtSender
impl Send for rustfmtSender
impl Sync for rustfmtSender
impl Unpin for rustfmtSender
impl !UnwindSafe for rustfmtSender
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