Skip to main content

WebDocumentRepresentation

Trait WebDocumentRepresentation 

Source
pub unsafe trait WebDocumentRepresentation: NSObjectProtocol {
    // Provided methods
    unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
       where Self: Sized + Message { ... }
    unsafe fn receivedData_withDataSource(
        &self,
        data: Option<&NSData>,
        data_source: Option<&WebDataSource>,
    )
       where Self: Sized + Message { ... }
    unsafe fn receivedError_withDataSource(
        &self,
        error: Option<&NSError>,
        data_source: Option<&WebDataSource>,
    )
       where Self: Sized + Message { ... }
    unsafe fn finishedLoadingWithDataSource(
        &self,
        data_source: Option<&WebDataSource>,
    )
       where Self: Sized + Message { ... }
    unsafe fn canProvideDocumentSource(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn documentSource(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn title(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature WebDocument only.
Expand description

Protocol implemented by the document representation of a data source.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called soon after the document representation is created.

Parameter dataSource: The data source that is set.

§Safety

data_source might not allow None.

Source

unsafe fn receivedData_withDataSource( &self, data: Option<&NSData>, data_source: Option<&WebDataSource>, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called when the data source has received data.

Parameter data: The data that the data source has received.

Parameter dataSource: The data source that has received data.

§Safety
  • data might not allow None.
  • data_source might not allow None.
Source

unsafe fn receivedError_withDataSource( &self, error: Option<&NSError>, data_source: Option<&WebDataSource>, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called when the data source has received an error.

Parameter error: The error that the data source has received.

Parameter dataSource: The data source that has received the error.

§Safety
  • error might not allow None.
  • data_source might not allow None.
Source

unsafe fn finishedLoadingWithDataSource( &self, data_source: Option<&WebDataSource>, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature WebDataSource only.

Called when the data source has finished loading.

Parameter dataSource: The datasource that has finished loading.

§Safety

data_source might not allow None.

Source

unsafe fn canProvideDocumentSource(&self) -> bool
where Self: Sized + Message,

👎Deprecated

Returns: Returns true if the representation can provide document source.

Source

unsafe fn documentSource(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

👎Deprecated

Returns: Returns the textual source representation of the document. For HTML documents this is the original HTML source.

Source

unsafe fn title(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

👎Deprecated

Returns: Return the title for the document.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn WebDocumentRepresentation

Source§

impl ProtocolType for dyn WebDocumentRepresentation

Source§

const NAME: &'static str = "WebDocumentRepresentation"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> WebDocumentRepresentation for ProtocolObject<T>

Implementors§