pub struct SpecifierPolicyRequest { /* private fields */ }Expand description
Data-only input to a ModuleSpecifierPolicy.
Deliberately absent are a source root, runtime context, and authority. A policy may select or normalize text, but cannot probe storage or acquire a capability through this interface.
Implementations§
Source§impl SpecifierPolicyRequest
impl SpecifierPolicyRequest
Sourcepub fn new(
importer: Option<ModuleIdentity>,
candidates: Vec<String>,
) -> Result<Self, SpecifierRefusal>
pub fn new( importer: Option<ModuleIdentity>, candidates: Vec<String>, ) -> Result<Self, SpecifierRefusal>
Constructs a bounded policy request, or an exact refusal when its shape exceeds the seam’s fixed limits.
Sourcepub fn importer(&self) -> Option<&ModuleIdentity>
pub fn importer(&self) -> Option<&ModuleIdentity>
Importer identity available for language-specific textual normalization.
Sourcepub fn candidates(&self) -> &[String]
pub fn candidates(&self) -> &[String]
Bounded candidate texts, in caller-declared order.
Trait Implementations§
Source§impl Clone for SpecifierPolicyRequest
impl Clone for SpecifierPolicyRequest
Source§fn clone(&self) -> SpecifierPolicyRequest
fn clone(&self) -> SpecifierPolicyRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpecifierPolicyRequest
impl Debug for SpecifierPolicyRequest
impl Eq for SpecifierPolicyRequest
Source§impl PartialEq for SpecifierPolicyRequest
impl PartialEq for SpecifierPolicyRequest
impl StructuralPartialEq for SpecifierPolicyRequest
Auto Trait Implementations§
impl Freeze for SpecifierPolicyRequest
impl RefUnwindSafe for SpecifierPolicyRequest
impl Send for SpecifierPolicyRequest
impl Sync for SpecifierPolicyRequest
impl Unpin for SpecifierPolicyRequest
impl UnsafeUnpin for SpecifierPolicyRequest
impl UnwindSafe for SpecifierPolicyRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more