pub struct Link {
pub root: PathBuf,
pub server: String,
pub slug: String,
}Fields§
§root: PathBufThe folder that holds .semora (canonical).
server: StringThe server’s origin, normalized.
slug: StringImplementations§
Source§impl Link
impl Link
Sourcepub fn check_origin(&self, have: &str) -> Result<()>
pub fn check_origin(&self, have: &str) -> Result<()>
The server named in .semora must be the one this command uses.
pub fn check_server(&self, client: &Client) -> Result<()>
Sourcepub fn relative_path(&self, target: &Path) -> Result<String>
pub fn relative_path(&self, target: &Path) -> Result<String>
The pushed path relative to the project root, joined with /.
Trait Implementations§
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Forget for Link
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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