Skip to main content

NSTextElementProvider

Trait NSTextElementProvider 

Source
pub unsafe trait NSTextElementProvider: NSObjectProtocol {
    // Provided methods
    fn documentRange(&self) -> Retained<NSTextRange>
       where Self: Sized + Message { ... }
    fn enumerateTextElementsFromLocation_options_usingBlock(
        &self,
        text_location: Option<&ProtocolObject<dyn NSTextLocation>>,
        options: NSTextContentManagerEnumerationOptions,
        block: &DynBlock<dyn Fn(NonNull<NSTextElement>) -> Bool + '_>,
    ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
       where Self: Sized + Message { ... }
    fn replaceContentsInRange_withTextElements(
        &self,
        range: &NSTextRange,
        text_elements: Option<&NSArray<NSTextElement>>,
    )
       where Self: Sized + Message { ... }
    fn synchronizeToBackingStore(
        &self,
        completion_handler: Option<&DynBlock<dyn Fn(*mut NSError)>>,
    )
       where Self: Sized + Message { ... }
    fn locationFromLocation_withOffset(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        offset: NSInteger,
    ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
       where Self: Sized + Message { ... }
    fn offsetFromLocation_toLocation(
        &self,
        from: &ProtocolObject<dyn NSTextLocation>,
        to: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn adjustedRangeFromRange_forEditingTextSelection(
        &self,
        text_range: &NSTextRange,
        for_editing_text_selection: bool,
    ) -> Option<Retained<NSTextRange>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSTextContentManager only.
Expand description

Provided Methods§

Source

fn documentRange(&self) -> Retained<NSTextRange>
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn enumerateTextElementsFromLocation_options_usingBlock( &self, text_location: Option<&ProtocolObject<dyn NSTextLocation>>, options: NSTextContentManagerEnumerationOptions, block: &DynBlock<dyn Fn(NonNull<NSTextElement>) -> Bool + '_>, ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
where Self: Sized + Message,

Available on crate features block2 and NSTextElement and NSTextRange only.
Source

fn replaceContentsInRange_withTextElements( &self, range: &NSTextRange, text_elements: Option<&NSArray<NSTextElement>>, )
where Self: Sized + Message,

Available on crate features NSTextElement and NSTextRange only.
Source

fn synchronizeToBackingStore( &self, completion_handler: Option<&DynBlock<dyn Fn(*mut NSError)>>, )
where Self: Sized + Message,

Available on crate feature block2 only.
Source

fn locationFromLocation_withOffset( &self, location: &ProtocolObject<dyn NSTextLocation>, offset: NSInteger, ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn offsetFromLocation_toLocation( &self, from: &ProtocolObject<dyn NSTextLocation>, to: &ProtocolObject<dyn NSTextLocation>, ) -> NSInteger
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn adjustedRangeFromRange_forEditingTextSelection( &self, text_range: &NSTextRange, for_editing_text_selection: bool, ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate feature NSTextRange only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSTextElementProvider

Source§

impl ProtocolType for dyn NSTextElementProvider

Source§

const NAME: &'static str = "NSTextElementProvider"

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> NSTextElementProvider for ProtocolObject<T>

Implementors§