pub struct ExternalPackage {
pub for_namespace: String,
pub location: PackageLocation,
pub module_name: Option<String>,
pub version: Option<String>,
}Expand description
A reference to a package that provides types from another namespace, so the generator can emit the correct import statements.
Fields§
§for_namespace: StringThe namespace as specified in #[facet(fg::namespace = "namespace")].
location: PackageLocationThe location of the package.
module_name: Option<String>The name of the module, if you are importing one from a package.
e.g. in TypeScript: import { Foo } from 'package_name/module_name';
version: Option<String>An optional string to specify the version of a published package.
Implementations§
Trait Implementations§
Source§impl Clone for ExternalPackage
impl Clone for ExternalPackage
Source§fn clone(&self) -> ExternalPackage
fn clone(&self) -> ExternalPackage
Returns a duplicate of the value. Read more
1.0.0 · 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 ExternalPackage
impl Debug for ExternalPackage
Source§impl Hash for ExternalPackage
impl Hash for ExternalPackage
Source§impl Ord for ExternalPackage
impl Ord for ExternalPackage
Source§fn cmp(&self, other: &ExternalPackage) -> Ordering
fn cmp(&self, other: &ExternalPackage) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExternalPackage
impl PartialEq for ExternalPackage
Source§impl PartialOrd for ExternalPackage
impl PartialOrd for ExternalPackage
Source§impl Serialize for ExternalPackage
impl Serialize for ExternalPackage
impl Eq for ExternalPackage
impl StructuralPartialEq for ExternalPackage
Auto Trait Implementations§
impl Freeze for ExternalPackage
impl RefUnwindSafe for ExternalPackage
impl Send for ExternalPackage
impl Sync for ExternalPackage
impl Unpin for ExternalPackage
impl UnsafeUnpin for ExternalPackage
impl UnwindSafe for ExternalPackage
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