pub struct FixedLengthFileWriterBuilder { /* private fields */ }Expand description
A helper struct for building an instance of a FixedLengthFileWriter struct.
Implementations§
Source§impl FixedLengthFileWriterBuilder
impl FixedLengthFileWriterBuilder
Sourcepub fn with_out_path(self, out_path: PathBuf) -> Self
pub fn with_out_path(self, out_path: PathBuf) -> Self
Set the relative or absolute path to write the fixed-length file (.flf) to.
Sourcepub fn with_properties(
self,
properties: FixedLengthFileWriterProperties,
) -> Self
pub fn with_properties( self, properties: FixedLengthFileWriterProperties, ) -> Self
Set the properties to use when opening the file descriptor.
Sourcepub fn try_build(self) -> Result<FixedLengthFileWriter>
pub fn try_build(self) -> Result<FixedLengthFileWriter>
Try creating a new FixedLengthFileWriter from the previously set values.
§Errors
If any of the required fields have not been set and thus are None, or if
the properties contained an invalid combination of settings. See OpenOptions
documentation for details on all errors it can return.
Sourcepub fn build(self) -> FixedLengthFileWriter
pub fn build(self) -> FixedLengthFileWriter
Creates a new FixedLengthFileWriter from the previously set values.
§Note
This method internally calls the try_build method and simply unwraps the returned
Result. If you don’t care about error propagation, use this method over try_build.
§Panics
If any of the required fields have not been set and thus are None, or if the
properties contained an invalid combination of settings.