pub struct FixedLengthFileWriterPropertiesBuilder { /* private fields */ }Expand description
A helper struct for building an instance of a FixedLengthFileWriterProperties struct.
Implementations§
Source§impl FixedLengthFileWriterPropertiesBuilder
impl FixedLengthFileWriterPropertiesBuilder
Sourcepub fn with_force_create_new(self, force_create_new: bool) -> Self
pub fn with_force_create_new(self, force_create_new: bool) -> Self
Set the option to enforce that there can not already exist a file with the same name.
Sourcepub fn with_create_or_open(self, create_or_open: bool) -> Self
pub fn with_create_or_open(self, create_or_open: bool) -> Self
Set the option to allow there existing a file with the same name, in which case, the file will be opened and appended to.
Sourcepub fn with_truncate_existing(self, truncate_existing: bool) -> Self
pub fn with_truncate_existing(self, truncate_existing: bool) -> Self
Set the option to truncate the file if it already exists. If the file does not already exist, then this option has no effect.
Sourcepub fn try_build(self) -> Result<FixedLengthFileWriterProperties>
pub fn try_build(self) -> Result<FixedLengthFileWriterProperties>
Try creating a new FixedLengthFileWriterProperties from the previously set values.
§Errors
Iff any of the required fields have not been set and thus are None.
Sourcepub fn build(self) -> FixedLengthFileWriterProperties
pub fn build(self) -> FixedLengthFileWriterProperties
Creates a new FixedLengthFileWriterProperties 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
Iff any of the required fields have not been set and thus are None.