pub struct NetworkRecord {Show 21 fields
pub id: u64,
pub method: SharedString,
pub url: SharedString,
pub kind: ResourceKind,
pub state: RequestState,
pub status: Option<u16>,
pub status_text: SharedString,
pub protocol: SharedString,
pub remote_address: SharedString,
pub priority: SharedString,
pub transfer_size: u64,
pub resource_size: u64,
pub cached: bool,
pub request_headers: Vec<(SharedString, SharedString)>,
pub response_headers: Vec<(SharedString, SharedString)>,
pub request_body: Option<SharedString>,
pub response_body: Option<SharedString>,
pub initiator: Option<SourceRef>,
pub error: Option<SharedString>,
pub start: Duration,
pub timings: Timings,
}Expand description
One network request.
Fields§
§id: u64§method: SharedString§url: SharedString§kind: ResourceKind§state: RequestState§status: Option<u16>§status_text: SharedString§protocol: SharedString§remote_address: SharedString§priority: SharedString§transfer_size: u64Bytes on the wire, after compression.
resource_size: u64Bytes after decoding — what the app actually received.
cached: bool§request_headers: Vec<(SharedString, SharedString)>§response_headers: Vec<(SharedString, SharedString)>§request_body: Option<SharedString>§response_body: Option<SharedString>§initiator: Option<SourceRef>§error: Option<SharedString>§start: DurationWhen the request started, relative to the store’s epoch. The waterfall lays rows out against this.
timings: TimingsImplementations§
Source§impl NetworkRecord
impl NetworkRecord
pub fn new( method: impl Into<SharedString>, url: impl Into<SharedString>, ) -> Self
pub fn kind(self, kind: ResourceKind) -> Self
pub fn status(self, status: u16, text: impl Into<SharedString>) -> Self
pub fn sizes(self, transfer: u64, resource: u64) -> Self
pub fn timings(self, timings: Timings) -> Self
pub fn request_header( self, name: impl Into<SharedString>, value: impl Into<SharedString>, ) -> Self
pub fn response_header( self, name: impl Into<SharedString>, value: impl Into<SharedString>, ) -> Self
pub fn request_body(self, body: impl Into<SharedString>) -> Self
pub fn response_body(self, body: impl Into<SharedString>) -> Self
pub fn initiator(self, source: SourceRef) -> Self
pub fn finished(self) -> Self
pub fn failed(self, error: impl Into<SharedString>) -> Self
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The Name column: the last path segment, or the host for a bare origin.
Sourcepub fn is_error(&self) -> bool
pub fn is_error(&self) -> bool
Whether the row renders in the error color: a transport failure, or any 4xx/5xx response.
pub fn duration(&self) -> Duration
Trait Implementations§
Source§impl Clone for NetworkRecord
impl Clone for NetworkRecord
Source§fn clone(&self) -> NetworkRecord
fn clone(&self) -> NetworkRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NetworkRecord
impl RefUnwindSafe for NetworkRecord
impl Send for NetworkRecord
impl Sync for NetworkRecord
impl Unpin for NetworkRecord
impl UnsafeUnpin for NetworkRecord
impl UnwindSafe for NetworkRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more