pub enum LinkContent {
Link {
target: RcStr,
link_type: LinkType,
},
Invalid,
NotFound,
}Expand description
The contents of a symbolic link. On Windows, this may be a junction point.
When reading, we treat symbolic links and junction points on Windows as equivalent. When creating a new link, we always create junction points, because symlink creation may fail if Windows “developer mode” is not enabled and we’re running in an unprivileged environment.
Variants§
Link
A valid symbolic link pointing to target.
When reading a relative link, the target is raw value read from the link.
When reading an absolute link, the target is stripped of the root path while reading. This ensures we don’t store absolute paths inside of the persistent cache.
We don’t use the FileSystemPath to store the target, because the FileSystemPath is
always normalized. In FileSystemPath::write_symbolic_link_dir we need to compare
target with the value returned by [sys::fs::read_link].
Invalid
NotFound
Implementations§
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.
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
Source§impl PartialEq for LinkContent
impl PartialEq for LinkContent
Source§impl ShrinkToFit for LinkContent
impl ShrinkToFit for LinkContent
fn shrink_to_fit(&mut self)
Source§impl TraceRawVcs for LinkContent
impl TraceRawVcs for LinkContent
fn trace_raw_vcs(&self, __context__: &mut TraceRawVcsContext)
fn get_raw_vcs(&self) -> Vec<RawVc>
Source§impl ValueDebug for LinkContent
impl ValueDebug for LinkContent
Source§impl ValueDebugFormat for LinkContent
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
impl Eq for LinkContent
impl NonLocalValue for LinkContent
impl StructuralPartialEq for LinkContent
impl Upcast<Box<dyn ValueDebug>> for LinkContent
impl UpcastStrict<Box<dyn ValueDebug>> for LinkContent
Auto Trait Implementations§
impl Freeze for LinkContent
impl RefUnwindSafe for LinkContent
impl Send for LinkContent
impl Sync for LinkContent
impl Unpin for LinkContent
impl UnwindSafe for LinkContent
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> 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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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