pub struct WriteOptions<'a> {
pub topic: Option<&'a str>,
}
Expand description
Allows you to customize a RecordWriter
’s write.
For example, use WriteOptions
to customize the output topic to write to.
Fields§
§topic: Option<&'a str>
Implementations§
Source§impl<'a> WriteOptions<'a>
impl<'a> WriteOptions<'a>
Sourcepub fn new(topic: Option<&'a str>) -> WriteOptions<'a>
pub fn new(topic: Option<&'a str>) -> WriteOptions<'a>
Create a new options struct with the Record
’s destination to an optional topic
.
If topic
is None
, the record will be written to the first
output topic listed in the configuration.
Sourcepub fn to_topic(topic: &'a str) -> WriteOptions<'a>
pub fn to_topic(topic: &'a str) -> WriteOptions<'a>
Create a new options struct with the Record
’s destination to topic
.
Trait Implementations§
Source§impl<'a> Clone for WriteOptions<'a>
impl<'a> Clone for WriteOptions<'a>
Source§fn clone(&self) -> WriteOptions<'a>
fn clone(&self) -> WriteOptions<'a>
Returns a copy 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<'a> Debug for WriteOptions<'a>
impl<'a> Debug for WriteOptions<'a>
Source§impl<'a> Default for WriteOptions<'a>
impl<'a> Default for WriteOptions<'a>
Source§fn default() -> WriteOptions<'a>
fn default() -> WriteOptions<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for WriteOptions<'a>
impl<'a> PartialEq for WriteOptions<'a>
impl<'a> Eq for WriteOptions<'a>
impl<'a> StructuralPartialEq for WriteOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for WriteOptions<'a>
impl<'a> RefUnwindSafe for WriteOptions<'a>
impl<'a> Send for WriteOptions<'a>
impl<'a> Sync for WriteOptions<'a>
impl<'a> Unpin for WriteOptions<'a>
impl<'a> UnwindSafe for WriteOptions<'a>
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