Skip to main content

LiveTextInteraction

Struct LiveTextInteraction 

Source
pub struct LiveTextInteraction { /* private fields */ }

Implementations§

Source§

impl LiveTextInteraction

Source

pub fn new() -> Result<Self, VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 26)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
More examples
Hide additional examples
examples/02_framework_smoke.rs (line 52)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    println!("== VisionKit.framework smoke ==");
14    println!("ImageAnalyzer supported: {}", ImageAnalyzer::is_supported());
15    println!(
16        "document camera available on macOS: {}",
17        VNDocumentCameraViewController::is_available_on_current_platform()?
18    );
19    println!(
20        "data scanner available on macOS: {}",
21        DataScannerViewController::is_available_on_current_platform()?
22    );
23
24    let languages = ImageAnalyzer::supported_text_recognition_languages()?;
25    println!("supported OCR languages: {}", languages.len());
26    println!(
27        "sample OCR languages: {:?}",
28        languages.iter().take(10).collect::<Vec<_>>()
29    );
30
31    if !ImageAnalyzer::is_supported() {
32        println!("ImageAnalyzer is not supported on this Mac");
33        return Ok(());
34    }
35
36    let analyzer = ImageAnalyzer::new()?;
37    let configuration = ImageAnalyzerConfiguration::new(
38        ImageAnalysisTypes::TEXT | ImageAnalysisTypes::MACHINE_READABLE_CODE,
39    )
40    .with_locales(["en-US"]);
41    let asset_path = asset_path();
42    let analysis =
43        analyzer.analyze_image_at_path(&asset_path, ImageOrientation::Up, &configuration)?;
44
45    println!(
46        "has text results: {}",
47        analysis.has_results(ImageAnalysisTypes::TEXT)?
48    );
49    let transcript = analysis.transcript()?;
50    println!("transcript: {transcript:?}");
51
52    let interaction = LiveTextInteraction::new()?;
53    interaction.track_image_at_path(&asset_path)?;
54    interaction.set_analysis(&analysis)?;
55    println!(
56        "overlay preferred types: {}",
57        interaction.preferred_interaction_types()?.bits()
58    );
59    let overlay_text = interaction.text();
60    println!("overlay text: {overlay_text:?}");
61    Ok(())
62}
Source

pub fn set_analysis( &self, analysis: &ImageAnalysis, ) -> Result<(), VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 28)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
More examples
Hide additional examples
examples/02_framework_smoke.rs (line 54)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    println!("== VisionKit.framework smoke ==");
14    println!("ImageAnalyzer supported: {}", ImageAnalyzer::is_supported());
15    println!(
16        "document camera available on macOS: {}",
17        VNDocumentCameraViewController::is_available_on_current_platform()?
18    );
19    println!(
20        "data scanner available on macOS: {}",
21        DataScannerViewController::is_available_on_current_platform()?
22    );
23
24    let languages = ImageAnalyzer::supported_text_recognition_languages()?;
25    println!("supported OCR languages: {}", languages.len());
26    println!(
27        "sample OCR languages: {:?}",
28        languages.iter().take(10).collect::<Vec<_>>()
29    );
30
31    if !ImageAnalyzer::is_supported() {
32        println!("ImageAnalyzer is not supported on this Mac");
33        return Ok(());
34    }
35
36    let analyzer = ImageAnalyzer::new()?;
37    let configuration = ImageAnalyzerConfiguration::new(
38        ImageAnalysisTypes::TEXT | ImageAnalysisTypes::MACHINE_READABLE_CODE,
39    )
40    .with_locales(["en-US"]);
41    let asset_path = asset_path();
42    let analysis =
43        analyzer.analyze_image_at_path(&asset_path, ImageOrientation::Up, &configuration)?;
44
45    println!(
46        "has text results: {}",
47        analysis.has_results(ImageAnalysisTypes::TEXT)?
48    );
49    let transcript = analysis.transcript()?;
50    println!("transcript: {transcript:?}");
51
52    let interaction = LiveTextInteraction::new()?;
53    interaction.track_image_at_path(&asset_path)?;
54    interaction.set_analysis(&analysis)?;
55    println!(
56        "overlay preferred types: {}",
57        interaction.preferred_interaction_types()?.bits()
58    );
59    let overlay_text = interaction.text();
60    println!("overlay text: {overlay_text:?}");
61    Ok(())
62}
Source

pub fn track_image_at_path<P: AsRef<Path>>( &self, path: P, ) -> Result<(), VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 27)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
More examples
Hide additional examples
examples/02_framework_smoke.rs (line 53)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    println!("== VisionKit.framework smoke ==");
14    println!("ImageAnalyzer supported: {}", ImageAnalyzer::is_supported());
15    println!(
16        "document camera available on macOS: {}",
17        VNDocumentCameraViewController::is_available_on_current_platform()?
18    );
19    println!(
20        "data scanner available on macOS: {}",
21        DataScannerViewController::is_available_on_current_platform()?
22    );
23
24    let languages = ImageAnalyzer::supported_text_recognition_languages()?;
25    println!("supported OCR languages: {}", languages.len());
26    println!(
27        "sample OCR languages: {:?}",
28        languages.iter().take(10).collect::<Vec<_>>()
29    );
30
31    if !ImageAnalyzer::is_supported() {
32        println!("ImageAnalyzer is not supported on this Mac");
33        return Ok(());
34    }
35
36    let analyzer = ImageAnalyzer::new()?;
37    let configuration = ImageAnalyzerConfiguration::new(
38        ImageAnalysisTypes::TEXT | ImageAnalysisTypes::MACHINE_READABLE_CODE,
39    )
40    .with_locales(["en-US"]);
41    let asset_path = asset_path();
42    let analysis =
43        analyzer.analyze_image_at_path(&asset_path, ImageOrientation::Up, &configuration)?;
44
45    println!(
46        "has text results: {}",
47        analysis.has_results(ImageAnalysisTypes::TEXT)?
48    );
49    let transcript = analysis.transcript()?;
50    println!("transcript: {transcript:?}");
51
52    let interaction = LiveTextInteraction::new()?;
53    interaction.track_image_at_path(&asset_path)?;
54    interaction.set_analysis(&analysis)?;
55    println!(
56        "overlay preferred types: {}",
57        interaction.preferred_interaction_types()?.bits()
58    );
59    let overlay_text = interaction.text();
60    println!("overlay text: {overlay_text:?}");
61    Ok(())
62}
Source

pub fn preferred_interaction_types( &self, ) -> Result<LiveTextInteractionTypes, VisionKitError>

Examples found in repository?
examples/02_framework_smoke.rs (line 57)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    println!("== VisionKit.framework smoke ==");
14    println!("ImageAnalyzer supported: {}", ImageAnalyzer::is_supported());
15    println!(
16        "document camera available on macOS: {}",
17        VNDocumentCameraViewController::is_available_on_current_platform()?
18    );
19    println!(
20        "data scanner available on macOS: {}",
21        DataScannerViewController::is_available_on_current_platform()?
22    );
23
24    let languages = ImageAnalyzer::supported_text_recognition_languages()?;
25    println!("supported OCR languages: {}", languages.len());
26    println!(
27        "sample OCR languages: {:?}",
28        languages.iter().take(10).collect::<Vec<_>>()
29    );
30
31    if !ImageAnalyzer::is_supported() {
32        println!("ImageAnalyzer is not supported on this Mac");
33        return Ok(());
34    }
35
36    let analyzer = ImageAnalyzer::new()?;
37    let configuration = ImageAnalyzerConfiguration::new(
38        ImageAnalysisTypes::TEXT | ImageAnalysisTypes::MACHINE_READABLE_CODE,
39    )
40    .with_locales(["en-US"]);
41    let asset_path = asset_path();
42    let analysis =
43        analyzer.analyze_image_at_path(&asset_path, ImageOrientation::Up, &configuration)?;
44
45    println!(
46        "has text results: {}",
47        analysis.has_results(ImageAnalysisTypes::TEXT)?
48    );
49    let transcript = analysis.transcript()?;
50    println!("transcript: {transcript:?}");
51
52    let interaction = LiveTextInteraction::new()?;
53    interaction.track_image_at_path(&asset_path)?;
54    interaction.set_analysis(&analysis)?;
55    println!(
56        "overlay preferred types: {}",
57        interaction.preferred_interaction_types()?.bits()
58    );
59    let overlay_text = interaction.text();
60    println!("overlay text: {overlay_text:?}");
61    Ok(())
62}
Source

pub fn set_preferred_interaction_types( &self, interaction_types: LiveTextInteractionTypes, ) -> Result<(), VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 29)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
Source

pub fn active_interaction_types( &self, ) -> Result<LiveTextInteractionTypes, VisionKitError>

Source

pub fn selectable_items_highlighted(&self) -> Result<bool, VisionKitError>

Source

pub fn set_selectable_items_highlighted( &self, value: bool, ) -> Result<(), VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 30)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
Source

pub fn has_active_text_selection(&self) -> Result<bool, VisionKitError>

Source

pub fn reset_selection(&self) -> Result<(), VisionKitError>

Source

pub fn text(&self) -> Result<String, VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 33)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
More examples
Hide additional examples
examples/02_framework_smoke.rs (line 59)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    println!("== VisionKit.framework smoke ==");
14    println!("ImageAnalyzer supported: {}", ImageAnalyzer::is_supported());
15    println!(
16        "document camera available on macOS: {}",
17        VNDocumentCameraViewController::is_available_on_current_platform()?
18    );
19    println!(
20        "data scanner available on macOS: {}",
21        DataScannerViewController::is_available_on_current_platform()?
22    );
23
24    let languages = ImageAnalyzer::supported_text_recognition_languages()?;
25    println!("supported OCR languages: {}", languages.len());
26    println!(
27        "sample OCR languages: {:?}",
28        languages.iter().take(10).collect::<Vec<_>>()
29    );
30
31    if !ImageAnalyzer::is_supported() {
32        println!("ImageAnalyzer is not supported on this Mac");
33        return Ok(());
34    }
35
36    let analyzer = ImageAnalyzer::new()?;
37    let configuration = ImageAnalyzerConfiguration::new(
38        ImageAnalysisTypes::TEXT | ImageAnalysisTypes::MACHINE_READABLE_CODE,
39    )
40    .with_locales(["en-US"]);
41    let asset_path = asset_path();
42    let analysis =
43        analyzer.analyze_image_at_path(&asset_path, ImageOrientation::Up, &configuration)?;
44
45    println!(
46        "has text results: {}",
47        analysis.has_results(ImageAnalysisTypes::TEXT)?
48    );
49    let transcript = analysis.transcript()?;
50    println!("transcript: {transcript:?}");
51
52    let interaction = LiveTextInteraction::new()?;
53    interaction.track_image_at_path(&asset_path)?;
54    interaction.set_analysis(&analysis)?;
55    println!(
56        "overlay preferred types: {}",
57        interaction.preferred_interaction_types()?.bits()
58    );
59    let overlay_text = interaction.text();
60    println!("overlay text: {overlay_text:?}");
61    Ok(())
62}
Source

pub fn selected_text(&self) -> Result<String, VisionKitError>

Source

pub fn contents_rect(&self) -> Result<Rect, VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 31)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
Source

pub fn has_interactive_item_at_point( &self, x: f64, y: f64, ) -> Result<bool, VisionKitError>

Source

pub fn has_text_at_point(&self, x: f64, y: f64) -> Result<bool, VisionKitError>

Source

pub fn has_data_detector_at_point( &self, x: f64, y: f64, ) -> Result<bool, VisionKitError>

Source

pub fn has_supplementary_interface_at_point( &self, x: f64, y: f64, ) -> Result<bool, VisionKitError>

Source

pub fn analysis_has_text_at_point( &self, x: f64, y: f64, ) -> Result<bool, VisionKitError>

Source

pub fn live_text_button_visible(&self) -> Result<bool, VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 37)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
Source

pub fn is_supplementary_interface_hidden(&self) -> Result<bool, VisionKitError>

Examples found in repository?
examples/05_live_text_interaction.rs (line 41)
12fn main() -> Result<(), Box<dyn std::error::Error>> {
13    if !ImageAnalyzer::is_supported() {
14        println!("ImageAnalyzer is not supported on this Mac");
15        return Ok(());
16    }
17
18    let asset_path = asset_path();
19    let analyzer = ImageAnalyzer::new()?;
20    let analysis = analyzer.analyze_image_at_path(
21        &asset_path,
22        ImageOrientation::Up,
23        &ImageAnalyzerConfiguration::new(ImageAnalysisTypes::TEXT),
24    )?;
25
26    let interaction = LiveTextInteraction::new()?;
27    interaction.track_image_at_path(&asset_path)?;
28    interaction.set_analysis(&analysis)?;
29    interaction.set_preferred_interaction_types(LiveTextInteractionTypes::AUTOMATIC_TEXT_ONLY)?;
30    interaction.set_selectable_items_highlighted(true)?;
31    let rect = interaction.contents_rect()?;
32    println!("contents rect: {rect:?}");
33    let overlay_text = interaction.text();
34    println!("overlay text: {overlay_text:?}");
35    println!(
36        "live text button visible: {}",
37        interaction.live_text_button_visible()?
38    );
39    println!(
40        "supplementary hidden: {}",
41        interaction.is_supplementary_interface_hidden()?
42    );
43    Ok(())
44}
Source

pub fn set_supplementary_interface_hidden( &self, hidden: bool, animated: bool, ) -> Result<(), VisionKitError>

Source

pub fn supplementary_interface_content_insets( &self, ) -> Result<EdgeInsets, VisionKitError>

Source

pub fn set_supplementary_interface_content_insets( &self, insets: EdgeInsets, ) -> Result<(), VisionKitError>

Trait Implementations§

Source§

impl Drop for LiveTextInteraction

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.