pub struct Extern {
pub name: Ident,
pub target: Option<String>,
pub origin: Origin<Item>,
}Expand description
A type the flat API names but whose contents it does not model.
Two spellings declare one thing, because what the frontend records is the fact rather than the Rust shape that carried it:
#[prebindgen] pub type X = path::To<Thing>;— how a foreign or crate-private type gets a name here. A one-way road: the name is thereafter the only way to spell that type inside the flat API, and the qualified path stays refused. This declares a name; it is not an equivalence between spellings: the normalization that makesstd::vec::Vec<T>andVec<T>one key covers the names the language predeclares, and a crate’s own alias is never one of those — treating it as one is a category error.#[prebindgen] pub struct X(..);— a tuple struct, whose fields no adapter has ever crossed.
Not necessarily a handle: #[prebindgen] pub type Duration = std::time::Duration; crosses by value through a convert!, erased to a plain
integer. What it becomes — an opaque pointer, a ptr_class, a conversion — is
the adapter’s decision, and this says only that the frontend does not model the
contents.
Fields§
§name: Ident§target: Option<String>What the declaration points at, for an alias — std::time::Duration,
zenoh::Session, handles::Storage. None for a tuple struct, which is
itself the definition.
Informational, and deliberately not classified. Error is
Box<dyn std::error::Error + Send + Sync> behind a zenoh:: alias in one
crate and spelled openly in another, so being “a std type” is a property of
the spelling, not of the type. An adapter that wants to recognise a target
may; the frontend does not decide for it.
origin: Origin<Item>The declaring item — a type alias or a tuple struct.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Extern
impl !Sync for Extern
impl Freeze for Extern
impl RefUnwindSafe for Extern
impl Unpin for Extern
impl UnsafeUnpin for Extern
impl UnwindSafe for Extern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more