pub struct CachedResourceBuilder { /* private fields */ }Expand description
Builder for CachedResource.
Implementations§
Source§impl CachedResourceBuilder
impl CachedResourceBuilder
Sourcepub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Resource URL. This is the url of the original network request.
Sourcepub fn type<VALUE: Into<ResourceType>>(&mut self, value: VALUE) -> &mut Self
pub fn type<VALUE: Into<ResourceType>>(&mut self, value: VALUE) -> &mut Self
Type of this resource.
Sourcepub fn response<VALUE: Into<Response>>(&mut self, value: VALUE) -> &mut Self
pub fn response<VALUE: Into<Response>>(&mut self, value: VALUE) -> &mut Self
Cached response data.
Sourcepub fn body_size<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn body_size<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Cached response body size.
Sourcepub fn build(&self) -> Result<CachedResource, CachedResourceBuilderError>
pub fn build(&self) -> Result<CachedResource, CachedResourceBuilderError>
Trait Implementations§
Source§impl Clone for CachedResourceBuilder
impl Clone for CachedResourceBuilder
Source§fn clone(&self) -> CachedResourceBuilder
fn clone(&self) -> CachedResourceBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 CachedResourceBuilder
impl RefUnwindSafe for CachedResourceBuilder
impl Send for CachedResourceBuilder
impl Sync for CachedResourceBuilder
impl Unpin for CachedResourceBuilder
impl UnsafeUnpin for CachedResourceBuilder
impl UnwindSafe for CachedResourceBuilder
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