pub struct AXTextMarkerRange { /* private fields */ }AXUIElement and HIServices only.Expand description
An AXTextMarkerRangeRef is a CFType. Like all CFTypes, they are reference counted (
//apple_ref/c/func/CFRetain CFRetain,
//apple_ref/c/func/CFRelease CFRelease).
See also Apple’s documentation
Implementations§
Source§impl AXTextMarkerRange
impl AXTextMarkerRange
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
start_marker: &AXTextMarker,
end_marker: &AXTextMarker,
) -> CFRetained<AXTextMarkerRange>
pub unsafe fn new( allocator: Option<&CFAllocator>, start_marker: &AXTextMarker, end_marker: &AXTextMarker, ) -> CFRetained<AXTextMarkerRange>
Creates a new text marker given a start and end marker
Parameter startMarker: The text marker for the beginning of the range
Parameter endMarker: The text marker for the end of the range
Returns: The text marker range object
Sourcepub unsafe fn with_bytes(
allocator: Option<&CFAllocator>,
start_marker_bytes: NonNull<u8>,
start_marker_length: CFIndex,
end_marker_bytes: NonNull<u8>,
end_marker_length: CFIndex,
) -> CFRetained<AXTextMarkerRange>
pub unsafe fn with_bytes( allocator: Option<&CFAllocator>, start_marker_bytes: NonNull<u8>, start_marker_length: CFIndex, end_marker_bytes: NonNull<u8>, end_marker_length: CFIndex, ) -> CFRetained<AXTextMarkerRange>
Creates a new text marker given the bytes for a start marker and an end marker
Parameter startMarkerBytes: The data used to identify the start marker location in text
Parameter startMarkerLength: The length of the start marker data
Parameter endMarkeBytes: The data used to identify the end marker location in text
Parameter endMarkerLength: The length of the end marker data
Returns: The text marker range object
§Safety
start_marker_bytesmust be a valid pointer.end_marker_bytesmust be a valid pointer.
Sourcepub unsafe fn start_marker(&self) -> CFRetained<AXTextMarker>
pub unsafe fn start_marker(&self) -> CFRetained<AXTextMarker>
Copies the start marker from a text marker range
Parameter textMarkerRange: The text marker range
Returns: The start text marker object
Sourcepub unsafe fn end_marker(&self) -> CFRetained<AXTextMarker>
pub unsafe fn end_marker(&self) -> CFRetained<AXTextMarker>
Copies the end marker from a text marker range
Parameter textMarkerRange: The text marker range
Returns: The end text marker object
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AXTextMarkerRange> for AXTextMarkerRange
impl AsRef<AXTextMarkerRange> for AXTextMarkerRange
Source§impl AsRef<AnyObject> for AXTextMarkerRange
impl AsRef<AnyObject> for AXTextMarkerRange
Source§impl AsRef<CFType> for AXTextMarkerRange
impl AsRef<CFType> for AXTextMarkerRange
Source§impl Borrow<AnyObject> for AXTextMarkerRange
impl Borrow<AnyObject> for AXTextMarkerRange
Source§impl Borrow<CFType> for AXTextMarkerRange
impl Borrow<CFType> for AXTextMarkerRange
Source§impl ConcreteType for AXTextMarkerRange
impl ConcreteType for AXTextMarkerRange
Source§impl Debug for AXTextMarkerRange
impl Debug for AXTextMarkerRange
Source§impl Deref for AXTextMarkerRange
impl Deref for AXTextMarkerRange
Source§impl Hash for AXTextMarkerRange
impl Hash for AXTextMarkerRange
Source§impl Message for AXTextMarkerRange
impl Message for AXTextMarkerRange
Source§impl PartialEq for AXTextMarkerRange
impl PartialEq for AXTextMarkerRange
Source§impl RefEncode for AXTextMarkerRange
impl RefEncode for AXTextMarkerRange
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for AXTextMarkerRange
impl Type for AXTextMarkerRange
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
this is redundant
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
use CFRetained::retain
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
this is redundant (CF types deref to CFType)
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
use CFRetained::from_raw
core-foundation crate. Read more