logos.lang.marker

Module lang · package logos-lang

Traits

traitSelfDescribing

trait SelfDescribing

Implemented by custom-DSTs (#[self_describing] structs) to recover their tail length. All reference forms (*Foo, &Foo, &mut Foo) become thin pointers; the compiler calls dst_len whenever it needs the tail length (materializing a fat &Foo, building a foo.tail view, bound-checking foo.tail[i]).

Implemented by: Segment WString

traitSend

trait Send

Marks a type safe to transfer across thread boundaries. Auto trait: the compiler synthesizes impls from field types. Raw pointers are !Send; opt back in with unsafe impl Send for MyType {}.

Implemented by: Vec String Arc Weak Mutex RwLock LockingStore Box

traitSized

trait Sized

Marks a type whose size is known at compile time. Implicit bound on every generic type parameter unless opted out with T: ?Sized. Unsized types (str, [T], dyn Trait) appear only behind (fat) references/pointers.

traitSync

trait Sync

Marks a type safe to share by reference across threads: &T is Send iff T: Sync. Auto trait: synthesized from field types; raw pointers are !Sync.

Implemented by: Vec String Arc Weak Mutex RwLock LockingStore Box

traitUnpin

trait Unpin

Marks a type that can be safely moved even after being pinned. Auto trait: derived structurally — a type is Unpin unless it stores a PhantomPinned field or is marked #[pinned]; refs and raw pointers are always Unpin. Pin<P> ergonomics ship in logos.lang.pin.

Types

enumInfallible

enum Infallible

An empty (uninhabited) enum: the error type of a Result that can never be Err. Not the never type — Logos has a real ! (type of a divergent fn … -> !); use ! for divergence and Infallible only as a “this variant is impossible” stand-in.

structPhantomData

struct PhantomData

A zero-sized type-anchor for T. Unlike Rust, does not drive dropck/variance/auto-traits here — serves only as a type anchor, equivalent to a _t: T field without needing an actual T value. Construct with the empty struct literal PhantomData::<T>{}.

structPhantomPinned

struct PhantomPinned

A zero-sized field that opts a struct out of Unpin. A struct containing one (or marked #[pinned]) is !Unpin, so it cannot be moved out of a Pin<P>.