pub struct Client<C> { /* private fields */ }
Expand description
DSCFG client
This represents a connection to the DSCFG server and allows manipulating shared configurationn as well as receiving notifictions about changes.
You should usually create it by calling new()
function of this crate,
but you may use custom stream if you need finer control.
Implementations§
Source§impl<Val: Serialize + for<'a> Deserialize<'a>, E, C: Stream<Item = Response<Val>, Error = E> + Sink<SinkItem = Request<Val>, SinkError = E>> Client<C>
impl<Val: Serialize + for<'a> Deserialize<'a>, E, C: Stream<Item = Response<Val>, Error = E> + Sink<SinkItem = Request<Val>, SinkError = E>> Client<C>
Sourcepub fn set_value(
self,
key: String,
value: Val,
) -> impl Future<Item = Self, Error = E>
pub fn set_value( self, key: String, value: Val, ) -> impl Future<Item = Self, Error = E>
Sends request to set the key
to given value
.
Returns future which resolves to Client
, if the request succeeded.
Auto Trait Implementations§
impl<C> Freeze for Client<C>where
C: Freeze,
impl<C> RefUnwindSafe for Client<C>where
C: RefUnwindSafe,
impl<C> Send for Client<C>where
C: Send,
impl<C> Sync for Client<C>where
C: Sync,
impl<C> Unpin for Client<C>where
C: Unpin,
impl<C> UnwindSafe for Client<C>where
C: UnwindSafe,
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