Struct icrate::WebKit::WebArchive
source · #[repr(C)]pub struct WebArchive { /* private fields */ }WebKit and WebKit_WebArchive only.Implementations§
source§impl WebArchive
impl WebArchive
pub unsafe fn initWithMainResource_subresources_subframeArchives(
this: Option<Allocated<Self>>,
main_resource: Option<&WebResource>,
subresources: Option<&NSArray>,
subframe_archives: Option<&NSArray>
) -> Option<Id<Self, Shared>>
Foundation_NSArray and WebKit_WebResource only.pub unsafe fn initWithData(
this: Option<Allocated<Self>>,
data: Option<&NSData>
) -> Option<Id<Self, Shared>>
Foundation_NSData only.pub unsafe fn mainResource(&self) -> Option<Id<WebResource, Shared>>
WebKit_WebResource only.pub unsafe fn subresources(&self) -> Id<NSArray, Shared>
Foundation_NSArray only.pub unsafe fn subframeArchives(&self) -> Id<NSArray, Shared>
Foundation_NSArray only.pub unsafe fn data(&self) -> Id<NSData, Shared>
Foundation_NSData only.Methods from Deref<Target = Object>§
sourcepub unsafe fn ivar_ptr<T>(&self, name: &str) -> *mut Twhere
T: Encode,
pub unsafe fn ivar_ptr<T>(&self, name: &str) -> *mut Twhere
T: Encode,
Returns a pointer to the instance variable / ivar with the given name.
This is similar to [UnsafeCell::get], see that for more information
on what is and isn’t safe to do.
Usually you will have defined the instance variable yourself with
ClassBuilder::add_ivar, the type of the ivar T must match the
type used in that.
Attempting to access or modify private implementation details of a class that you do no control using this is not supported, and may invoke undefined behaviour.
Library implementors are strongly encouraged to expose a safe interface to the ivar.
Panics
May panic if the object has no ivar with the given name. May also
panic if the type encoding of the ivar differs from the type encoding
of T.
This should purely seen as help while debugging and is not guaranteed
(e.g. it may be disabled when debug_assertions are off).
Safety
The object must have an instance variable with the given name, and it
must be of type T. Any invariants that the object have assumed about
the value of the instance variable must not be violated.
No thread syncronization is done on accesses to the variable, so you must ensure that any access to the returned pointer do not cause data races, and that Rust’s mutability rules are not otherwise violated.
sourcepub unsafe fn ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the instance variable with the given name.
See Object::ivar_ptr for more information, including on when this
panics.
Safety
The object must have an instance variable with the given name, and it
must be of type T.
No thread syncronization is done, so you must ensure that no other
thread is concurrently mutating the variable. This requirement can be
considered upheld if all mutation happens through Object::ivar_mut
(since that takes &mut self).
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: Use Object::ivar instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Object::ivar instead.sourcepub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar with the given name.
See Object::ivar_ptr for more information, including on when this
panics.
Safety
The object must have an instance variable with the given name, and it
must be of type T.
This access happens through &mut self, which means we know it to be
the only reference, hence you do not need to do any work to ensure
that data races do not happen.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: Use Object::ivar_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Object::ivar_mut instead.sourcepub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)where
T: Encode,
pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)where
T: Encode,
Sets the value of the ivar with the given name.
This is just a helpful shorthand for Object::ivar_mut, see that
for more information.
Safety
Same as Object::ivar_mut.
Trait Implementations§
source§impl AsMut<NSObject> for WebArchive
impl AsMut<NSObject> for WebArchive
source§impl AsMut<Object> for WebArchive
impl AsMut<Object> for WebArchive
source§impl AsMut<WebArchive> for WebArchive
impl AsMut<WebArchive> for WebArchive
source§impl AsRef<NSObject> for WebArchive
impl AsRef<NSObject> for WebArchive
source§impl AsRef<Object> for WebArchive
impl AsRef<Object> for WebArchive
source§impl AsRef<WebArchive> for WebArchive
impl AsRef<WebArchive> for WebArchive
source§impl Borrow<NSObject> for WebArchive
impl Borrow<NSObject> for WebArchive
source§impl Borrow<Object> for WebArchive
impl Borrow<Object> for WebArchive
source§impl BorrowMut<NSObject> for WebArchive
impl BorrowMut<NSObject> for WebArchive
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<Object> for WebArchive
impl BorrowMut<Object> for WebArchive
source§fn borrow_mut(&mut self) -> &mut Object
fn borrow_mut(&mut self) -> &mut Object
source§impl ClassType for WebArchive
impl ClassType for WebArchive
source§impl Debug for WebArchive
impl Debug for WebArchive
source§impl Deref for WebArchive
impl Deref for WebArchive
source§impl DerefMut for WebArchive
impl DerefMut for WebArchive
source§impl Hash for WebArchive
impl Hash for WebArchive
source§impl NSCoding for WebArchive
impl NSCoding for WebArchive
source§impl NSObjectProtocol for WebArchive
impl NSObjectProtocol for WebArchive
source§impl PartialEq<WebArchive> for WebArchive
impl PartialEq<WebArchive> for WebArchive
source§fn eq(&self, other: &WebArchive) -> bool
fn eq(&self, other: &WebArchive) -> bool
self and other values to be equal, and is used
by ==.