pub struct CoreWebView2CustomSchemeRegistration { /* private fields */ }
Implementations§
source§impl CoreWebView2CustomSchemeRegistration
impl CoreWebView2CustomSchemeRegistration
pub fn new(scheme_name: String) -> Self
sourcepub fn scheme_name(&self) -> &str
pub fn scheme_name(&self) -> &str
Equivalent to ICoreWebView2CustomSchemeRegistration::SchemeName
without extra memory
copies or type conversions.
sourcepub unsafe fn treat_as_secure(&self) -> bool
pub unsafe fn treat_as_secure(&self) -> bool
Equivalent to ICoreWebView2CustomSchemeRegistration::TreatAsSecure
without extra memory
copies or type conversions.
Safety
This method reads from the same UnsafeCell<bool>
as the COM method, but it does not
write to a mutable pointer for the result.
sourcepub unsafe fn set_treat_as_secure(&self, value: bool)
pub unsafe fn set_treat_as_secure(&self, value: bool)
Equivalent to ICoreWebView2CustomSchemeRegistration::SetTreatAsSecure
without extra
memory copies or type conversions.
Safety
This method writes to the same UnsafeCell<bool>
as the COM method. It takes an
immutable reference to self
so that it can be reused in the COM method.
sourcepub unsafe fn allowed_origins(&self) -> Vec<String>
pub unsafe fn allowed_origins(&self) -> Vec<String>
Equivalent to ICoreWebView2CustomSchemeRegistration::GetAllowedOrigins
without extra
memory copies or type conversions.
Safety
This method reads from the same UnsafeCell<Vec<>>
as the COM method, but it does not
allocate or write to a mutable pointer for the result.
sourcepub unsafe fn set_allowed_origins(&self, value: Vec<String>)
pub unsafe fn set_allowed_origins(&self, value: Vec<String>)
Equivalent to ICoreWebView2CustomSchemeRegistration::SetAllowedOrigins
without extra
memory copies or type conversions.
Safety
This method writes to the same UnsafeCell<Vec<>>
as the COM method. It takes an
immutable reference to self
for consistency with the other public set methods, however
the COM method implementation does not actually reuse it.
Equivalent to ICoreWebView2CustomSchemeRegistration::HasAuthorityComponent
without extra
memory copies or type conversions.
Safety
This method reads from the same UnsafeCell<bool>
as the COM method, but it does not
write to a mutable pointer for the result.
Equivalent to ICoreWebView2CustomSchemeRegistration::SetHasAuthorityComponent
without
extra memory copies or type conversions.
Safety
This method writes to the same UnsafeCell<bool>
as the COM method. It takes an
immutable reference to self
so that it can be reused in the COM method.