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 { ... }
}WebDocument only.Expand description
Protocol implemented by the document representation of a data source.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn setDataSource(&self, data_source: Option<&WebDataSource>)
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.
Sourceunsafe fn receivedData_withDataSource(
&self,
data: Option<&NSData>,
data_source: Option<&WebDataSource>,
)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn receivedData_withDataSource( &self, data: Option<&NSData>, data_source: Option<&WebDataSource>, )
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
datamight not allowNone.data_sourcemight not allowNone.
Sourceunsafe fn receivedError_withDataSource(
&self,
error: Option<&NSError>,
data_source: Option<&WebDataSource>,
)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn receivedError_withDataSource( &self, error: Option<&NSError>, data_source: Option<&WebDataSource>, )
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
errormight not allowNone.data_sourcemight not allowNone.
Sourceunsafe fn finishedLoadingWithDataSource(
&self,
data_source: Option<&WebDataSource>,
)
👎DeprecatedAvailable on crate feature WebDataSource only.
unsafe fn finishedLoadingWithDataSource( &self, data_source: Option<&WebDataSource>, )
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.
Sourceunsafe fn canProvideDocumentSource(&self) -> bool
👎Deprecated
unsafe fn canProvideDocumentSource(&self) -> bool
Returns: Returns true if the representation can provide document source.
Sourceunsafe fn documentSource(&self) -> Option<Retained<NSString>>
👎Deprecated
unsafe fn documentSource(&self) -> Option<Retained<NSString>>
Returns: Returns the textual source representation of the document. For HTML documents this is the original HTML source.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn WebDocumentRepresentation
Source§impl ProtocolType for dyn WebDocumentRepresentation
impl ProtocolType for dyn WebDocumentRepresentation
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".