pub struct LocalLocation { /* private fields */ }Expand description
ローカルファイルシステムの拠点。
walkdir + ContentHasher でスキャンする。
Implementations§
Source§impl LocalLocation
impl LocalLocation
Sourcepub fn new(root: PathBuf, hasher: Arc<dyn ContentHasher>) -> Self
pub fn new(root: PathBuf, hasher: Arc<dyn ContentHasher>) -> Self
Create a LocalLocation with the canonical "local" LocationId.
§Arguments
root- Local filesystem path used asfile_rootfor scan and route resolution.hasher- Shared content hasher for change detection.
§Returns
A LocalLocation identified as "local".
For multiple LocalLocations with distinct IDs, use Self::new_with_id.
Sourcepub fn new_with_id(
id: LocationId,
root: PathBuf,
hasher: Arc<dyn ContentHasher>,
) -> Self
pub fn new_with_id( id: LocationId, root: PathBuf, hasher: Arc<dyn ContentHasher>, ) -> Self
Create a LocalLocation with an arbitrary LocationId.
Useful when registering multiple local roots as separate locations
(e.g. output vs projects). The caller is responsible for ensuring
the LocationId is unique within a single crate::application::sdk_impl::SdkImplBuilder.
§Arguments
id- Location identifier. Must be unique among all locations registered with the same builder. Constructed viaLocationId::new.root- Local filesystem path used asfile_rootfor scan and route resolution.hasher- Shared content hasher for change detection.
§Returns
A LocalLocation with the provided id and root.
Trait Implementations§
Source§impl Location for LocalLocation
impl Location for LocalLocation
Source§fn id(&self) -> &LocationId
fn id(&self) -> &LocationId
この拠点の識別子。
Auto Trait Implementations§
impl Freeze for LocalLocation
impl !RefUnwindSafe for LocalLocation
impl Send for LocalLocation
impl Sync for LocalLocation
impl Unpin for LocalLocation
impl UnsafeUnpin for LocalLocation
impl !UnwindSafe for LocalLocation
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