[−][src]Struct weasel::event::MultiClientSinkHandleMut
A structure to access and manipulate client sinks.
Methods
impl<'a, R> MultiClientSinkHandleMut<'a, R> where
R: BattleRules + 'static,
[src]
R: BattleRules + 'static,
pub fn add_sink(&mut self, sink: Box<dyn ClientSink<R>>) -> WeaselResult<(), R>
[src]
Adds a new sink.
Sinks must have unique ids.
pub fn add_sink_from(
&mut self,
sink: Box<dyn ClientSink<R>>,
event_id: EventId
) -> WeaselResult<(), R>
[src]
&mut self,
sink: Box<dyn ClientSink<R>>,
event_id: EventId
) -> WeaselResult<(), R>
Adds a new sink and shares the battle history with it,
starting from the event having event_id
up to the most recent event.
Sinks must have unique ids.
pub fn add_sink_range(
&mut self,
sink: Box<dyn ClientSink<R>>,
range: Range<EventId>
) -> WeaselResult<(), R>
[src]
&mut self,
sink: Box<dyn ClientSink<R>>,
range: Range<EventId>
) -> WeaselResult<(), R>
Adds a new sink and shares a portion of the battle history with it.
More precisely, only the events inside range
will be sent to the sink.
Sinks must have unique ids.
pub fn send_range(
&mut self,
id: EventSinkId,
range: Range<EventId>
) -> WeaselResult<(), R>
[src]
&mut self,
id: EventSinkId,
range: Range<EventId>
) -> WeaselResult<(), R>
Sends a range of events from the battle history to the sink with the given id.
pub fn remove_sink(&mut self, id: EventSinkId)
[src]
Removes the sink with the given id.
pub fn sinks(&self) -> impl Iterator<Item = &Box<dyn ClientSink<R>>>
[src]
Returns an iterator over all sinks.
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for MultiClientSinkHandleMut<'a, R>
impl<'a, R> !Send for MultiClientSinkHandleMut<'a, R>
impl<'a, R> !Sync for MultiClientSinkHandleMut<'a, R>
impl<'a, R> Unpin for MultiClientSinkHandleMut<'a, R>
impl<'a, R> !UnwindSafe for MultiClientSinkHandleMut<'a, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,