pub struct NavigationState {
pub url: Option<String>,
pub title: Option<String>,
pub page_type: Option<PageType>,
pub can_go_forward: Option<bool>,
pub can_go_back: Option<bool>,
pub is_main_document_loaded: Option<bool>,
pub favicon: Option<Favicon>,
pub error_detail: Option<ErrorDetail>,
/* private fields */
}
Expand description
Contains information about the [Frame
]’s navigation state.
Fields§
§url: Option<String>
The page’s URL.
title: Option<String>
The user-visible page title. While W3C style recommendation is that HTML TITLE tags not exceed 64 characters in length, there is no actual limit.
page_type: Option<PageType>
Indicates whether this was a navigation to an error page.
can_go_forward: Option<bool>
Indicates if there is a following navigation.
can_go_back: Option<bool>
Indicates if there is a previous navigation.
is_main_document_loaded: Option<bool>
Indicates that the main document’s statically declared resources have been loaded.
favicon: Option<Favicon>
Current favicon for the page. The field is set only when the FAVICON
flag is set for the
NavigationEventListener
and the favicon has changed.
error_detail: Option<ErrorDetail>
Indicates type of the error when page_type
is set to ERROR
.
Trait Implementations§
Source§fn default() -> NavigationState
fn default() -> NavigationState
Returns the “default value” for a type. Read more
Source§type Borrowed<'a> = &'a mut NavigationState
type Borrowed<'a> = &'a mut NavigationState
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§type Owned = NavigationState
type Owned = NavigationState
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Auto Trait Implementations§
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