pub struct FileConfig {
pub path: String,
pub subscribe_mode: bool,
pub delete: Option<bool>,
}Fields§
§path: StringPath to the file.
subscribe_mode: bool(Consumer only) If true, acts in Subscriber mode (like tail -f), reading new lines as they are written.
If false (default), acts in Consumer mode, reading lines and removing them from the file (queue behavior).
delete: Option<bool>(Consumer only) If true, lines are removed from the file after being processed by all subscribers. Defaults to true if subscribe_mode is false, and false if subscribe_mode is true.
Trait Implementations§
Source§impl Clone for FileConfig
impl Clone for FileConfig
Source§fn clone(&self) -> FileConfig
fn clone(&self) -> FileConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileConfig
impl Debug for FileConfig
Source§impl<'de> Deserialize<'de> for FileConfig
impl<'de> Deserialize<'de> for FileConfig
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileConfig
impl RefUnwindSafe for FileConfig
impl Send for FileConfig
impl Sync for FileConfig
impl Unpin for FileConfig
impl UnwindSafe for FileConfig
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