pub struct RollingPacketCaptureProxy { /* private fields */ }Implementations§
Source§impl RollingPacketCaptureProxy
impl RollingPacketCaptureProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.net.debug/RollingPacketCapture.
Sourcepub fn take_event_stream(&self) -> RollingPacketCaptureEventStream
pub fn take_event_stream(&self) -> RollingPacketCaptureEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn detach(&self, name: &str) -> Result<(), Error>
pub fn detach(&self, name: &str) -> Result<(), Error>
Detaches the lifetime of this protocol from the underlying packet capture.
After calling Detach, closing the client end no longer results in
the packet capture from being terminated. The passed string names this
packet capture and can be used once to reconnect via
[PacketCaptureProvider.ReconnectRolling]. This gives the client the
option of ensuring the packet capture is resilient against
disconnections.
Detach can be called multiple times, but only the name passed in the
most recent call is valid and previously passed names are invalidated.
Sourcepub fn stop_and_download(
&self,
channel: ServerEnd<FileMarker>,
) -> Result<(), Error>
pub fn stop_and_download( &self, channel: ServerEnd<FileMarker>, ) -> Result<(), Error>
Stop and make this rolling packet capture downloadable.
It is implicit by calling this method that the packet capture is stopped
due to user request, so the [RollingPacketCapture.OnEnded] event is
not emitted.
This method can be called multiple times, including across disconnects: a client can call this method, disconnect, reconnect, and call this method again.
The server discards the contents of the packet capture once this method has been called and there is no client connected to this protocol for some time.
Sourcepub fn discard(&self) -> Result<(), Error>
pub fn discard(&self) -> Result<(), Error>
Discard this rolling packet capture.
Clients should call this method when they have successfully downloaded the packet capture, or if they no longer need it for any reason.
When this method is called, the server closes all readers initialized
via [StopAndDownload] and all future interactions on this protocol
are invalid.
Trait Implementations§
Source§impl Clone for RollingPacketCaptureProxy
impl Clone for RollingPacketCaptureProxy
Source§fn clone(&self) -> RollingPacketCaptureProxy
fn clone(&self) -> RollingPacketCaptureProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RollingPacketCaptureProxy
impl Debug for RollingPacketCaptureProxy
Source§impl Proxy for RollingPacketCaptureProxy
impl Proxy for RollingPacketCaptureProxy
Source§type Protocol = RollingPacketCaptureMarker
type Protocol = RollingPacketCaptureMarker
Proxy controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.