Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/l10n/rust/l10nregistry-rs/src/source/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  fetcher.rs

  Sprache: Rust
 

use async_trait::async_trait;
use fluent_fallback::types::ResourceId;
use std::io;

/// The users of [`FileSource`] implement this trait to provide loading of
/// resources, returning the contents of a resource as a
/// `String`. [`FileSource`] handles the conversion from string representation
/// into `FluentResource`.
///
/// [`FileSource`]: source/struct.FileSource.html
#[async_trait(?Send)]
pub trait FileFetcher {
    /// Return the `String` representation for `path`. This version is
    /// blocking.
    ///
    /// See [`fetch`](#tymethod.fetch).
    fn fetch_sync(&self, resource_id: &ResourceId) -> io::Result<String>;

    /// Return the `String` representation for `path`.
    ///
    /// On success, returns `Poll::Ready(Ok(..))`.
    ///
    /// If no resource is available to be fetched, the method returns
    /// `Poll::Pending` and arranges for the current task (via
    /// `cx.waker().wake_by_ref()`) to receive a notification when the resource
    /// is available.
    ///
    /// See [`fetch_sync`](#tymethod.fetch_sync)
    async fn fetch(&self, path: &ResourceId) -> io::Result<String>;
}

Messung V0.5 in Prozent
C=95 H=88 G=91

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.