[−][src]Struct java_properties::PropertiesWriter
Writes to a properties file.
Methods
impl<W: Write> PropertiesWriter<W>
[src]
impl<W: Write> PropertiesWriter<W>
pub fn new(writer: W) -> Self
[src]
pub fn new(writer: W) -> Self
Writes to the given Write
stream.
pub fn write_comment(&mut self, comment: &str) -> Result<(), PropertiesError>
[src]
pub fn write_comment(&mut self, comment: &str) -> Result<(), PropertiesError>
Writes a comment to the file.
pub fn write(&mut self, key: &str, value: &str) -> Result<(), PropertiesError>
[src]
pub fn write(&mut self, key: &str, value: &str) -> Result<(), PropertiesError>
Writes a key/value pair to the file.
pub fn flush(&mut self) -> Result<(), PropertiesError>
[src]
pub fn flush(&mut self) -> Result<(), PropertiesError>
Flushes the underlying stream.
pub fn set_comment_prefix(
&mut self,
prefix: &str
) -> Result<(), PropertiesError>
[src]
pub fn set_comment_prefix(
&mut self,
prefix: &str
) -> Result<(), PropertiesError>
Sets the comment prefix.
The prefix must contain a '#' or a '!', may only contain spaces, tabs, or form feeds before the comment character, and may not contain any carriage returns or line feeds ('\r' or '\n').
pub fn set_kv_separator(
&mut self,
separator: &str
) -> Result<(), PropertiesError>
[src]
pub fn set_kv_separator(
&mut self,
separator: &str
) -> Result<(), PropertiesError>
Sets the key/value separator.
The separator may be non-empty whitespace, or a colon with optional whitespace on either side, or an equals sign with optional whitespace on either side. (Whitespace here means ' ', '\t', or '\f'.)
pub fn set_line_ending(&mut self, line_ending: LineEnding)
[src]
pub fn set_line_ending(&mut self, line_ending: LineEnding)
Sets the line ending.
Auto Trait Implementations
impl<W> Send for PropertiesWriter<W> where
W: Send,
impl<W> Send for PropertiesWriter<W> where
W: Send,
impl<W> Sync for PropertiesWriter<W> where
W: Sync,
impl<W> Sync for PropertiesWriter<W> where
W: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T