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,
) -> QueryResponseFut<RollingPacketCaptureDetachResult, DefaultFuchsiaResourceDialect>
pub fn detach( &self, name: &str, ) -> QueryResponseFut<RollingPacketCaptureDetachResult, DefaultFuchsiaResourceDialect>
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 thereafter to reconnect via
[PacketCaptureProvider.ReconnectRolling]. The protocol is still
detached after reconnecting. This gives the client the option of
ensuring the packet capture is resilient against disconnections.
Only the first call to Detach over the lifetime of the packet
capture (note this is different from the lifetime of this protocol
since it’s possible to disconnect and reconnect) is valid. Subsequent
calls cannot change the name of this capture.
Once this method returns, it is guaranteed that this rolling packet capture is detached.
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) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn discard(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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.
The server closes all readers initialized via [StopAndDownload]
and all future interactions on this protocol are invalid. When this
method returns, it is guaranteed that the packet capture has been
discarded and the usage quota has been released.
Trait Implementations§
Source§impl Clone for RollingPacketCaptureProxy
impl Clone for RollingPacketCaptureProxy
Source§fn clone(&self) -> RollingPacketCaptureProxy
fn clone(&self) -> RollingPacketCaptureProxy
1.0.0 (const: unstable) · 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.