Struct kube_runtime::reflector::store::Writer
source · pub struct Writer<K: 'static + Lookup + Clone>{ /* private fields */ }
Expand description
A writable Store handle
This is exclusive since it’s not safe to share a single Store
between multiple reflectors.
In particular, Restarted
events will clobber the state of other connected reflectors.
Implementations§
source§impl<K: 'static + Lookup + Clone> Writer<K>
impl<K: 'static + Lookup + Clone> Writer<K>
sourcepub fn new(dyntype: K::DynamicType) -> Self
pub fn new(dyntype: K::DynamicType) -> Self
Creates a new Writer with the specified dynamic type.
If the dynamic type is default-able (for example when writer is used with
k8s_openapi
types) you can use Default
instead.
sourcepub fn as_reader(&self) -> Store<K>
pub fn as_reader(&self) -> Store<K>
Return a read handle to the store
Multiple read handles may be obtained, by either calling as_reader
multiple times,
or by calling Store::clone()
afterwards.
sourcepub fn apply_watcher_event(&mut self, event: &Event<K>)
pub fn apply_watcher_event(&mut self, event: &Event<K>)
Applies a single watcher event to the store
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for Writer<K>
impl<K> !RefUnwindSafe for Writer<K>
impl<K> Send for Writer<K>
impl<K> Sync for Writer<K>
impl<K> Unpin for Writer<K>
impl<K> !UnwindSafe for Writer<K>
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