pub enum LinkContent {
Link {
target: LinkTarget,
},
NotFound,
Invalid {
reason: RcStr,
},
}Expand description
The contents of a symbolic link, as read from a filesystem. On Windows, this may be a junction point.
We treat symbolic links and junction points on Windows as equivalent when reading.
This describes the link itself and never the type of the file it points at. Use
LinkTarget::target_type if you need the type of the target.
Variants§
Link
A valid symbolic link pointing to target.
Fields
target: LinkTargetNotFound
The link itself does not exist at the path given to FileSystemPath::read_link.
This says nothing about whether the link’s target exists: a dangling link is still
returned as LinkContent::Link.
Invalid
The link could not be read.
This includes all I/O errors other than NotFound, denied paths, and targets that leave the
filesystem root. A relative target that steps out of the root and back into it is also
invalid, since resolving it would need the names of the root’s own ancestors, which a
root-relative path doesn’t carry.
Fields
reason: RcStrImplementations§
Source§impl LinkContent
impl LinkContent
Sourcepub fn cell(self) -> Vc<Self>
pub fn cell(self) -> Vc<Self>
Places a value in a cell of the current task.
Cell is selected based on the value type and call order of cell.
Sourcepub fn resolved_cell(self) -> ResolvedVc<Self>
pub fn resolved_cell(self) -> ResolvedVc<Self>
Places a value in a cell of the current task. Returns a
[ResolvedVc][turbo_tasks::ResolvedVc].
Cell is selected based on the value type and call order of cell.
Source§impl LinkContent
impl LinkContent
Sourcepub fn hash(
self: Vc<Self>,
salt: Vc<RcStr>,
algorithm: HashAlgorithm,
) -> Vc<RcStr>
pub fn hash( self: Vc<Self>, salt: Vc<RcStr>, algorithm: HashAlgorithm, ) -> Vc<RcStr>
Hashes the link itself (its target and type), not the content of whatever the link points
at. This mirrors FileContent::hash and is the right content hash for consumers that
re-create a symlink as a symlink instead of copying the resolved file.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for LinkContent
impl<'__de, __Context> BorrowDecode<'__de, __Context> for LinkContent
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Source§impl Debug for LinkContent
impl Debug for LinkContent
Source§impl<__Context> Decode<__Context> for LinkContent
impl<__Context> Decode<__Context> for LinkContent
Source§impl Encode for LinkContent
impl Encode for LinkContent
impl Eq for LinkContent
impl NonLocalValue for LinkContent
Source§impl PartialEq for LinkContent
impl PartialEq for LinkContent
Source§impl ShrinkToFit for LinkContent
impl ShrinkToFit for LinkContent
fn shrink_to_fit(&mut self)
impl StructuralPartialEq for LinkContent
Source§impl TraceRawVcs for LinkContent
impl TraceRawVcs for LinkContent
fn trace_raw_vcs(&self, __context__: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
impl Upcast<Box<dyn ValueDebug>> for LinkContent
impl UpcastStrict<Box<dyn ValueDebug>> for LinkContent
Source§impl ValueDebug for LinkContent
impl ValueDebug for LinkContent
Source§impl ValueDebugFormat for LinkContent
Available on debug-assertions enabled only.
impl ValueDebugFormat for LinkContent
fn value_debug_format<'a>(&'a self, depth: usize) -> ValueDebugFormatString<'a>
Source§impl VcValueType for LinkContent
impl VcValueType for LinkContent
Source§type Read = VcDefaultRead<LinkContent>
type Read = VcDefaultRead<LinkContent>
Source§type CellMode = VcCellCompareMode<LinkContent>
type CellMode = VcCellCompareMode<LinkContent>
Source§fn get_value_type_id() -> ValueTypeId
fn get_value_type_id() -> ValueTypeId
fn has_serialization() -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for LinkContent
impl !UnwindSafe for LinkContent
impl Freeze for LinkContent
impl Send for LinkContent
impl Sync for LinkContent
impl Unpin for LinkContent
impl UnsafeUnpin for LinkContent
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
impl<T> DynEq for T
§impl<T> DynPartialEq for T
impl<T> DynPartialEq for T
fn dyn_partial_eq(&self, other: &(dyn Any + 'static)) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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