// Copyright (c) 2018 The predicates-rs Project Developers. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
//! Introspect into the state of a `Predicate`.
use std::borrow; use std::fmt; use std::slice;
/// Introspect the state of a `Predicate`. pubtrait PredicateReflection: fmt::Display { /// Parameters of the current `Predicate`. fn parameters<'a>(&'a self) -> Box<dyn Iterator<Item = Parameter<'a>> + 'a> { let params = vec![]; Box::new(params.into_iter())
}
/// Nested `Predicate`s of the current `Predicate`. fn children<'a>(&'a self) -> Box<dyn Iterator<Item = Child<'a>> + 'a> { let params = vec![]; Box::new(params.into_iter())
}
}
/// A view of a `Predicate` parameter, provided by reflection. /// /// ```rust /// use predicates_core; /// /// let param = predicates_core::reflection::Parameter::new("key", &10); /// println!("{}", param); /// ``` pubstruct Parameter<'a>(&'a str, &'a dyn fmt::Display);
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.